X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.in;h=8f14e5aafdd9a54196b299f383d2659a7b13996c;hp=409725e1e18b4efac98c61b4a6e7bd94b33a14b4;hb=38657223b245405602bc50906a9687ce98f53857;hpb=aab667adba868be9e9038a8686dc4919a5a8e96d diff --git a/Makefile.in b/Makefile.in index 409725e1..8f14e5aa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -3,18 +3,44 @@ exec_prefix := @exec_prefix@ BINDIR := @bindir@ VARDIR := /var/paraslash -PKGDATADIR := @datarootdir@/@PACKAGE_NAME@ MANDIR := @datarootdir@/man/man1 PACKAGE_VERSION := @PACKAGE_VERSION@ -PACKAGE_STRING := @PACKAGE_STRING@ -install_sh := @install_sh@ +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@ +samplerate_ldflags := @samplerate_ldflags@ +osl_ldflags := @osl_ldflags@ +openssl_ldflags := @openssl_ldflags@ +gcrypt_ldflags := @gcrypt_ldflags@ +socket_ldflags := @socket_ldflags@ +nsl_ldflags := @nsl_ldflags@ +curses_ldflags := @curses_ldflags@ +core_audio_ldflags := @core_audio_ldflags@ + build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") uname_rs := $(shell uname -rs) @@ -36,24 +62,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 @@ -105,7 +120,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 @@ -152,20 +167,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 $<' @@ -199,9 +220,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 $<' @@ -228,9 +249,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@)) @@ -251,49 +273,99 @@ ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(m4_deps) endif +para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags) +para_write para_play para_audiod: LDFLAGS += $(ao_ldflags) $(core_audio_ldflags) +para_client para_audioc para_play : LDFLAGS += $(readline_ldflags) +para_server: LDFLAGS += $(osl_ldflags) +para_gui: LDFLAGS += $(curses_ldflags) +para_server \ +para_client \ +para_audiod \ +:LDFLAGS += \ + $(openssl_ldflags) \ + $(gcrypt_ldflags) + +para_audiod \ +para_filter \ +para_play \ +: LDFLAGS += \ + $(mad_ldflags) \ + $(samplerate_ldflags) \ + -lm + +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_server \ +para_client \ +para_audioc \ +para_audiod \ +para_recv \ +: LDFLAGS += \ + $(socket_ldflags) $(nsl_ldflags) + para_recv: $(recv_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) $(recv_objs) -o $@ @recv_ldflags@ $(LDFLAGS) + $(Q) $(CC) $(recv_objs) -o $@ $(LDFLAGS) para_filter: $(filter_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) $(filter_objs) -o $@ @filter_ldflags@ $(LDFLAGS) + $(Q) $(CC) $(filter_objs) -o $@ $(LDFLAGS) para_client: $(client_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(client_objs) @client_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(client_objs) $(LDFLAGS) para_gui: $(gui_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(gui_objs) @gui_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(gui_objs) $(LDFLAGS) para_audiod: $(audiod_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(audiod_objs) @audiod_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(audiod_objs) $(LDFLAGS) para_audioc: $(audioc_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(audioc_objs) @audioc_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(audioc_objs) $(LDFLAGS) para_fade: $(fade_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(fade_objs) @fade_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(fade_objs) $(LDFLAGS) para_server: $(server_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(server_objs) @server_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(server_objs) $(LDFLAGS) para_write: $(write_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(write_objs) @write_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(write_objs) $(LDFLAGS) para_afh: $(afh_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(afh_objs) @afh_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(afh_objs) $(LDFLAGS) para_play: $(play_objs) @[ -z "$(Q)" ] || echo 'LD $@' - $(Q) $(CC) -o $@ $(play_objs) @play_ldflags@ $(LDFLAGS) + $(Q) $(CC) -o $@ $(play_objs) $(LDFLAGS) clean: @[ -z "$(Q)" ] || echo 'CLEAN' @@ -316,8 +388,8 @@ maintainer-clean: distclean install: all man $(MKDIR_P) $(BINDIR) $(MANDIR) - $(install_sh) -s -m 755 $(executables) $(BINDIR) - $(install_sh) -m 644 $(man_pages) $(MANDIR) + $(INSTALL) -s --strip-program $(STRIP) -m 755 $(executables) $(BINDIR) + $(INSTALL) -m 644 $(man_pages) $(MANDIR) $(MKDIR_P) $(VARDIR) >/dev/null 2>&1 || true # not fatal, so don't complain $(tarball):