]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - Makefile.real
Compile with -Wformat-signedness if possible.
[paraslash.git] / Makefile.real
index a226df1ba5713bc77b1744ed560c5eda0af6aa26..464cd68ee2a1af044d0b09e36f4681db2a836aae 100644 (file)
@@ -65,9 +65,8 @@ tarball_pfx := $(PACKAGE_TARNAME)-$(GIT_VERSION)
 tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
 tarball := $(tarball_pfx).tar.bz2
 
-.PHONY: dep all clean clean2 distclean maintainer-clean install man tarball
-all: dep $(prefixed_executables) $(man_pages)
-dep: $(deps)
+.PHONY: all clean clean2 distclean maintainer-clean install man tarball
+all: $(prefixed_executables) $(man_pages)
 man: $(man_pages)
 tarball: $(tarball)
 
@@ -129,6 +128,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")