install_sh := @install_sh@
build_date := $(shell date)
-system := $(shell uname -rs)
+uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
+uname_rs := $(shell uname -rs)
cc_version := $(shell $(CC) --version | head -n 1)
codename := solar saturation
# many warnings about trivial stuff
# CPPFLAGS += -Wconversion
-ifeq ($(uname_S),Linux)
+ifeq ($(uname_s),Linux)
CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS += -Wl,--gc-sections
CPPFLAGS += -Wstrict-prototypes
CPPFLAGS += -Wformat-security
CPPFLAGS += -DBINDIR='"$(BINDIR)"'
CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
-CPPFLAGS += -DSYSTEM='"$(system)"'
+CPPFLAGS += -DUNAME_RS='"$(uname_rs)"'
CPPFLAGS += -DCODENAME='"$(codename)"'
CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
CPPFLAGS += -Werror-implicit-function-declaration
return -E_COMMAND_SYNTAX;
return send_buffer(fd, VERSION_TEXT("server")
"built: " BUILD_DATE "\n"
- SYSTEM ", " CC_VERSION "\n"
+ UNAME_RS ", " CC_VERSION "\n"
);
}