X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.in;h=6e7cc2de1ebdd584c20dc5a81f25bb8cce12e510;hp=c500fb9e4606e434649a410b06b9d988b7bbc15c;hb=7de07ae2e268280bf63decf60c287f060883f8e3;hpb=782e47ecd725dd44d4425351e21540a6914b13aa diff --git a/Makefile.in b/Makefile.in index c500fb9e..6e7cc2de 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,13 +9,32 @@ 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@ +oss_ldflags := @oss_ldflags@ +alsa_ldflags := @alsa_ldflags@ +ao_ldflags := @ao_ldflags@ +readline_ldflags := @readline_ldflags@ + build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) @@ -37,24 +56,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 +114,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 +161,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 +214,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 +243,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 +267,33 @@ 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_write para_play para_audiod: LDFLAGS += $(ao_ldflags) +para_client para_audioc para_play : LDFLAGS += $(readline_ldflags) + +para_write \ +para_play \ +para_audiod \ +para_fade \ +: LDFLAGS += \ + $(oss_ldflags) \ + $(alsa_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)