X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.real;h=a226df1ba5713bc77b1744ed560c5eda0af6aa26;hp=36d6e2343dd314cb6c95a7170168f0e95296e750;hb=eacc2982fbf7e0c0b69508b57f85e839d1ba1013;hpb=e080d112e6a79c3f78c33d004010bff03b40b38d diff --git a/Makefile.real b/Makefile.real index 36d6e234..a226df1b 100644 --- a/Makefile.real +++ b/Makefile.real @@ -1,3 +1,12 @@ +# Implicit rules are implemented in make as suffix rules. The following rule +# empties the suffix list to disable the predefined implicit rules. This +# increases performance and avoids hard-to-debug behaviour. +.SUFFIXES: +MAKEFLAGS += -Rr +ifeq ("$(origin CC)", "default") + CC := cc +endif + vardir := /var/paraslash mandir := $(datarootdir)/man/man1 STRIP := $(CROSS_COMPILE)strip @@ -10,7 +19,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) -build_date := $(shell date) +COPYRIGHT_YEAR := 2016 ifeq ("$(origin O)", "command line") build_dir := $(O) @@ -83,11 +92,11 @@ $(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,\ $(subst z,Z,$1)))))))))))))))))))))))))) CPPFLAGS += -DBINDIR='"$(bindir)"' +CPPFLAGS += -DCOPYRIGHT_YEAR='"$(COPYRIGHT_YEAR)"' CPPFLAGS += -DBUILD_DATE='"$(build_date)"' CPPFLAGS += -DUNAME_RS='"$(uname_rs)"' CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F) -CPPFLAGS += $(arch_cppflags) CPPFLAGS += -I/usr/local/include CPPFLAGS += -I$(cmdline_dir) CPPFLAGS += -I$(cmdlist_dir) @@ -106,6 +115,7 @@ STRICT_CFLAGS += -Wredundant-decls STRICT_CFLAGS += -Wno-sign-compare -Wno-unknown-pragmas STRICT_CFLAGS += -Wformat -Wformat-security STRICT_CFLAGS += -Wmissing-format-attribute +STRICT_CFLAGS += -Wdeclaration-after-statement LDFLAGS += $(clock_gettime_ldflags) @@ -166,7 +176,8 @@ $(man_dir)/para_server.1: man_util_command_lists := $(server_command_lists) $(man_dir)/para_audiod.1: man_util_command_lists := $(audiod_command_lists) $(man_dir)/para_play.1: man_util_command_lists := $(play_command_lists) -$(man_dir)/para_%.1: $(ggo_dir)/%.ggo man_util.bash | $(man_dir) $(help2man_dir) +$(man_dir)/para_%.1: $(ggo_dir)/%.ggo man_util.bash \ + git-version.h | $(man_dir) $(help2man_dir) @[ -z "$(Q)" ] || echo 'MAN $<' $(Q) \ COMMAND_LISTS="$(man_util_command_lists)" \ @@ -323,14 +334,6 @@ para_recv \ : LDFLAGS += \ $(mp4v2_ldflags) -para_server \ -para_client \ -para_audioc \ -para_audiod \ -para_recv \ -: LDFLAGS += \ - $(socket_ldflags) $(nsl_ldflags) - para_afh para_recv para_server para_play: LDFLAGS += $(iconv_ldflags) $(foreach exe,$(executables),$(eval para_$(exe): $$($(exe)_objs)))