X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.real;h=8a8cd4342554f18cc05ca70c3f31a830e2a17e79;hp=980192ecf5543bcde432575128ad0723e5ab82f8;hb=3b3b41a8819bcb9c10772057de03878188ae6f8f;hpb=a775408e5d2e3b21dff741b89ff5330b397b5138 diff --git a/Makefile.real b/Makefile.real index 980192ec..8a8cd434 100644 --- a/Makefile.real +++ b/Makefile.real @@ -18,7 +18,7 @@ uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) cc_version := $(shell $(CC) --version | head -n 1) GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h) -COPYRIGHT_YEAR := 2016 +COPYRIGHT_YEAR := 2017 ifeq ("$(origin O)", "command line") build_dir := $(O) @@ -113,8 +113,6 @@ STRICT_CFLAGS += -Wformat -Wformat-security STRICT_CFLAGS += -Wmissing-format-attribute STRICT_CFLAGS += -Wdeclaration-after-statement -LDFLAGS += $(clock_gettime_ldflags) - ifeq ($(uname_s),Linux) # these cause warnings on *BSD CPPFLAGS += -Wunused-macros @@ -125,6 +123,13 @@ ifeq ($(uname_s),Linux) LDFLAGS += -Wl,--gc-sections endif +cc-option = $(shell \ + $(CC) $(1) -Werror -c -x c /dev/null -o /dev/null > /dev/null 2>&1 \ + && echo "$(1)" \ +) + +STRICT_CFLAGS += $(call cc-option, -Wformat-signedness) + # To put more focus on warnings, be less verbose as default # Use 'make V=1' to see the full commands ifeq ("$(origin V)", "command line") @@ -275,7 +280,7 @@ $(dep_dir)/%.d: %.c | $(dep_dir) para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags) para_write para_play para_audiod \ -: LDFLAGS += $(ao_ldflags) $(pthread_ldflags) $(core_audio_ldflags) +: LDFLAGS += $(ao_ldflags) $(pthread_ldflags) para_client para_audioc para_play : LDFLAGS += $(readline_ldflags) para_server: LDFLAGS += $(osl_ldflags) para_gui: LDFLAGS += $(curses_ldflags)