X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.in;h=93aae7cefa2649126ab8b563faab35f1754d9d4b;hp=50394e9ca570e9973f2d5e50eafd09b16292ffac;hb=19b0d3982d709f331fe5c982055a78d9f1842617;hpb=2f113b5e114ef62f2fd8d9f4445193e19cbfa690 diff --git a/Makefile.in b/Makefile.in index 50394e9c..93aae7ce 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,7 +8,7 @@ PACKAGE_VERSION := @PACKAGE_VERSION@ INSTALL := @install@ STRIP := $(CROSS_COMPILE)strip HOSTCC ?= cc -executables := $(addprefix para_, @executables@) +executables := @executables@ ggo_descriptions_declared := @ggo_descriptions_declared@ object_executable_matrix := @object_executable_matrix@ @@ -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@ @@ -50,6 +62,8 @@ nsl_ldflags := @nsl_ldflags@ curses_ldflags := @curses_ldflags@ core_audio_ldflags := @core_audio_ldflags@ +prefixed_executables := $(addprefix para_, $(executables)) + build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) @@ -73,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 @@ -106,7 +141,7 @@ CPPFLAGS += $(osl_cppflags) LDFLAGS += @clock_gettime_ldflags@ -man_pages := $(patsubst %, $(man_dir)/%.1, $(executables)) +man_pages := $(patsubst %, $(man_dir)/%.1, $(prefixed_executables)) autocrap := config.h.in configure tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION) @@ -123,7 +158,7 @@ else endif .PHONY: dep all clean distclean maintainer-clean install man tarball -all: dep $(executables) $(man_pages) +all: dep $(prefixed_executables) $(man_pages) dep: $(deps) man: $(man_pages) tarball: $(tarball) @@ -230,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) @@ -304,53 +320,14 @@ para_recv \ : LDFLAGS += \ $(socket_ldflags) $(nsl_ldflags) -para_recv: $(recv_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) $(recv_objs) -o $@ $(LDFLAGS) - -para_filter: $(filter_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) $(filter_objs) -o $@ $(LDFLAGS) - -para_client: $(client_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(client_objs) $(LDFLAGS) - -para_gui: $(gui_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(gui_objs) $(LDFLAGS) - -para_audiod: $(audiod_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(audiod_objs) $(LDFLAGS) - -para_audioc: $(audioc_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(audioc_objs) $(LDFLAGS) - -para_fade: $(fade_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(fade_objs) $(LDFLAGS) - -para_server: $(server_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(server_objs) $(LDFLAGS) - -para_write: $(write_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(write_objs) $(LDFLAGS) - -para_afh: $(afh_objs) - @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(afh_objs) $(LDFLAGS) - -para_play: $(play_objs) +$(foreach exe,$(executables),$(eval para_$(exe): $$($(exe)_objs))) +$(prefixed_executables): @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(play_objs) $(LDFLAGS) + $(Q) $(CC) $^ -o $@ $(LDFLAGS) clean: @[ -z "$(Q)" ] || echo 'CLEAN' - $(Q) rm -f $(executables) + $(Q) rm -f $(prefixed_executables) $(Q) rm -rf $(object_dir) clean2: clean @@ -369,7 +346,8 @@ maintainer-clean: distclean install: all man $(MKDIR_P) $(BINDIR) $(MANDIR) - $(INSTALL) -s --strip-program $(STRIP) -m 755 $(executables) $(BINDIR) + $(INSTALL) -s --strip-program $(STRIP) -m 755 \ + $(prefixed_executables) $(BINDIR) $(INSTALL) -m 644 $(man_pages) $(MANDIR) $(MKDIR_P) $(VARDIR) >/dev/null 2>&1 || true # not fatal, so don't complain