X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.in;h=5eb89ec29dd06e4a07403898e5fd11118de08c5e;hp=6d14029c48b6a835832aa797ae78566269ad1c87;hb=e74262169a3b7124d73d330494569b87b2ce915d;hpb=e8b555a39bf1b41a0123f3e69b7190501cffa454 diff --git a/Makefile.in b/Makefile.in index 6d14029c..5eb89ec2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,13 +9,28 @@ PACKAGE_VERSION := @PACKAGE_VERSION@ PACKAGE_STRING := @PACKAGE_STRING@ INSTALL := @install@ STRIP := $(CROSS_COMPILE)strip +HOSTCC ?= cc executables := $(addprefix para_, @executables@) ggo_descriptions_declared := @ggo_descriptions_declared@ +object_executable_matrix := @object_executable_matrix@ + GENGETOPT := @gengetopt@ HELP2MAN := @help2man@ MKDIR_P := mkdir -p +speex_cppflags := @speex_cppflags@ +opus_cppflags := @opus_cppflags@ + +id3tag_ldflags := @id3tag_ldflags@ +ogg_ldflags := @ogg_ldflags@ +vorbis_ldflags := @vorbis_ldflags@ +speex_ldflags := @speex_ldflags@ +opus_ldflags := @opus_ldflags@ +faad_ldflags := @faad_ldflags@ +mad_ldflags := @mad_ldflags@ +flac_ldflags := @flac_ldflags@ + build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) @@ -37,24 +52,13 @@ man_dir := $(build_dir)/man/man1 cmdline_dir := $(build_dir)/cmdline m4depdir := $(build_dir)/m4deps help2man_dir := $(build_dir)/help2man +hostbin_dir := $(build_dir)/host/bin DEBUG_CPPFLAGS += -g -Wunused -Wundef -W DEBUG_CPPFLAGS += -Wredundant-decls DEBUG_CPPFLAGS += -Wall -Wno-sign-compare -Wno-unknown-pragmas DEBUG_CPPFLAGS += -Wformat-security DEBUG_CPPFLAGS += -Wmissing-format-attribute -# produces false positives -# DEBUG_CPPFLAGS += -Wunreachable-code -# DEBUG_CPPFLAGS += -Wwrite-strings - -# invalid option for gcc-3.3.3 -# DEBUG_CPPFLAGS += -Wextra -# DEBUG_CPPFLAGS += -Wold-style-definition -# DEBUG_CPPFLAGS += -Wdeclaration-after-statement -# DEBUG_CPPFLAGS += -Wsuggest-attribute=const - -# many warnings about trivial stuff -# CPPFLAGS += -Wconversion ifeq ($(uname_s),Linux) CPPFLAGS += -fdata-sections -ffunction-sections @@ -106,7 +110,7 @@ man: $(man_pages) tarball: $(tarball) $(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir) $(m4depdir) \ - $(help2man_dir): + $(help2man_dir) $(hostbin_dir): $(Q) $(MKDIR_P) $@ -include $(m4_ggo_dir)/makefile @@ -153,20 +157,26 @@ $(man_dir)/%.1: $(help2man_dir)/% | $(man_dir) @[ -z "$(Q)" ] || echo 'MAN $<' $(Q) $(HELP2MAN) -N ./$< > $@ +$(hostbin_dir)/error2: error2.c | $(hostbin_dir) + @[ -z "$(Q)" ] || echo 'HCC $<' + $(Q) $(HOSTCC) -o $@ $< +error2.h: $(hostbin_dir)/error2 + @[ -z "$(Q)" ] || echo 'ER2 $<' + @echo "$(object_executable_matrix)" | $< > $@ $(object_dir)/crypt.o: crypt.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @openssl_cppflags@ $< $(object_dir)/spx_common.o: spx_common.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< $(object_dir)/spxdec_filter.o: spxdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< $(object_dir)/spx_afh.o: spx_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $< + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $(speex_cppflags) @ogg_cppflags@ $< $(object_dir)/oggdec_filter.o: oggdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' @@ -200,9 +210,9 @@ $(object_dir)/aac_afh.o: aac_afh.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< +$(object_dir)/opus%.o: CPPFLAGS += $(opus_cppflags) +$(object_dir)/mp3_afh.o: CPPFLAGS += @id3tag_cppflags@ $(object_dir)/mp3_afh.o: mp3_afh.c | $(object_dir) - @[ -z "$(Q)" ] || echo 'CC $<' - $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @id3tag_cppflags@ $< $(object_dir)/gui%.o: gui%.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' @@ -229,9 +239,10 @@ $(dep_dir)/%.d: %.c | $(dep_dir) $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \ $(CPPFLAGS) $< > $@ -all_objs := @recv_objs@ @filter_objs@ @client_objs@ @gui_objs@ \ +# 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@ + @write_objs@ @afh_objs@ @play_objs@) deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d)) m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, @executables@)) @@ -252,6 +263,23 @@ ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(m4_deps) endif +para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags) +para_audiod para_filter para_play: LDFLAGS += $(mad_ldflags) + +para_server \ +para_filter \ +para_audiod \ +para_play \ +para_afh \ +para_recv \ +: LDFLAGS += \ + $(ogg_ldflags) \ + $(vorbis_ldflags) \ + $(speex_ldflags) \ + $(opus_ldflags) \ + $(faad_ldflags) \ + $(flac_ldflags) + para_recv: $(recv_objs) @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $(recv_objs) -o $@ @recv_ldflags@ $(LDFLAGS) @@ -266,7 +294,7 @@ para_client: $(client_objs) para_gui: $(gui_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(gui_objs) @gui_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(gui_objs) @curses_ldflags@ $(LDFLAGS) para_audiod: $(audiod_objs) @[ -z "$(Q)" ] || echo 'LD $@'