]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
build: Introduce Make variables for objects.
authorAndre Noll <maan@systemlinux.org>
Sun, 15 Sep 2013 02:18:44 +0000 (02:18 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:57:20 +0000 (11:57 +0100)
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.

Makefile.in

index 855b66937054186ca85ba1c0805daf58b43d80be..93aae7cefa2649126ab8b563faab35f1754d9d4b 100644 (file)
@@ -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)