From: Andre Noll Date: Tue, 11 Dec 2007 16:48:11 +0000 (+0100) Subject: Makefile.in: Avoid gcc warnings on non-linux systems. X-Git-Tag: v0.3.0~59^2~1 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=d2765e8ef91706453cdc6ed3fde89baf56ac718a;ds=sidebyside Makefile.in: Avoid gcc warnings on non-linux systems. -fdata-sections, -ffunction-sections, -Wl,--gc-sections, -Wstrict-prototypes and -Wshadow produce quite a lot of warnings on at least NetBSD and MacOS. So use these flags only on Linux. --- diff --git a/Makefile.in b/Makefile.in index c5d5027a..827d04f9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,13 +26,15 @@ DEBUG_CPPFLAGS += -Wredundant-decls # many warnings about trivial stuff # CPPFLAGS += -Wconversion -# uncomment this if your compiler supports it -# LDFLAGS += -Wl,--gc-sections - +ifeq ($(uname_S),Linux) + CPPFLAGS += -fdata-sections -ffunction-sections + LDFLAGS += -Wl,--gc-sections + CPPFLAGS += -Wstrict-prototypes + CPPFLAGS += -Wshadow +endif CPPFLAGS += -Os CPPFLAGS += -Wall CPPFLAGS += -Wuninitialized -CPPFLAGS += -Wstrict-prototypes CPPFLAGS += -Wchar-subscripts CPPFLAGS += -Wformat-security CPPFLAGS += -DBINDIR='"$(BINDIR)"' @@ -43,9 +45,7 @@ CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -Werror-implicit-function-declaration CPPFLAGS += -Wmissing-format-attribute CPPFLAGS += -Wunused-macros -CPPFLAGS += -Wshadow CPPFLAGS += -Wbad-function-cast -CPPFLAGS += -fdata-sections -ffunction-sections CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F) CPPFLAGS += @SSL_CPPFLAGS@ CPPFLAGS += @ncurses_cppflags@