From: Andre Noll Date: Sun, 15 Sep 2013 02:18:44 +0000 (+0000) Subject: build: Introduce Make variables for objects. X-Git-Tag: v0.5.1~1^2~9 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=19b0d3982d709f331fe5c982055a78d9f1842617 build: Introduce Make variables for objects. The definition of the various foo_objs variables still refers to the autoconf variables. Having a make variable for each set of object is another step towards the separation of autoconf and make. --- diff --git a/Makefile.in b/Makefile.in index 855b6693..93aae7ce 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,6 +17,18 @@ GENGETOPT := @gengetopt@ HELP2MAN := @help2man@ MKDIR_P := mkdir -p +recv_objs := @recv_objs@ +filter_objs := @filter_objs@ +client_objs := @client_objs@ +gui_objs := @gui_objs@ +audiod_objs := @audiod_objs@ +audioc_objs := @audioc_objs@ +fade_objs := @fade_objs@ +server_objs := @server_objs@ +write_objs := @write_objs@ +afh_objs := @afh_objs@ +play_objs := @play_objs@ + speex_cppflags := @speex_cppflags@ opus_cppflags := @opus_cppflags@ arch_cppflags := @arch_cppflags@ @@ -75,6 +87,27 @@ m4depdir := $(build_dir)/m4deps help2man_dir := $(build_dir)/help2man hostbin_dir := $(build_dir)/host/bin +# sort removes duplicate words, which is all we need here +all_objs := $(sort $(recv_objs) $(filter_objs) $(client_objs) $(gui_objs) \ + $(audiod_objs) $(audioc_objs) $(fade_objs) $(server_objs) \ + $(write_objs) $(afh_objs) $(play_objs)) +deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d)) +m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, $(executables))) + +# now prefix all objects with object dir +recv_objs := $(addprefix $(object_dir)/, $(recv_objs)) +filter_objs := $(addprefix $(object_dir)/, $(filter_objs)) +client_objs := $(addprefix $(object_dir)/, $(client_objs)) +gui_objs := $(addprefix $(object_dir)/, $(gui_objs)) +audiod_objs := $(addprefix $(object_dir)/, $(audiod_objs)) +audioc_objs := $(addprefix $(object_dir)/, $(audioc_objs)) +fade_objs := $(addprefix $(object_dir)/, $(fade_objs)) +server_objs := $(addprefix $(object_dir)/, $(server_objs)) +write_objs := $(addprefix $(object_dir)/, $(write_objs)) +afh_objs := $(addprefix $(object_dir)/, $(afh_objs)) +play_objs := $(addprefix $(object_dir)/, $(play_objs)) + + DEBUG_CPPFLAGS += -g -Wunused -Wundef -W DEBUG_CPPFLAGS += -Wredundant-decls DEBUG_CPPFLAGS += -Wall -Wno-sign-compare -Wno-unknown-pragmas @@ -232,25 +265,6 @@ $(dep_dir)/%.d: %.c | $(dep_dir) $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \ $(CPPFLAGS) $< > $@ -# sort removes duplicate words, which is all we need here -all_objs := $(sort @recv_objs@ @filter_objs@ @client_objs@ @gui_objs@ \ - @audiod_objs@ @audioc_objs@ @fade_objs@ @server_objs@ \ - @write_objs@ @afh_objs@ @play_objs@) -deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d)) -m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, $(executables))) - -recv_objs := $(addprefix $(object_dir)/, @recv_objs@) -filter_objs := $(addprefix $(object_dir)/, @filter_objs@) -client_objs := $(addprefix $(object_dir)/, @client_objs@) -gui_objs := $(addprefix $(object_dir)/, @gui_objs@) -audiod_objs := $(addprefix $(object_dir)/, @audiod_objs@) -audioc_objs := $(addprefix $(object_dir)/, @audioc_objs@) -fade_objs := $(addprefix $(object_dir)/, @fade_objs@) -server_objs := $(addprefix $(object_dir)/, @server_objs@) -write_objs := $(addprefix $(object_dir)/, @write_objs@) -afh_objs := $(addprefix $(object_dir)/, @afh_objs@) -play_objs := $(addprefix $(object_dir)/, @play_objs@) - ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(deps) -include $(m4_deps)