X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.in;h=6e7cc2de1ebdd584c20dc5a81f25bb8cce12e510;hp=f3dfea0065c31a564156000d0b1842eedc24e6c7;hb=7de07ae2e268280bf63decf60c287f060883f8e3;hpb=1775d4d4147730e79e48aa941aee88580b8beb08 diff --git a/Makefile.in b/Makefile.in index f3dfea00..6e7cc2de 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,18 +7,38 @@ PKGDATADIR := @datarootdir@/@PACKAGE_NAME@ MANDIR := @datarootdir@/man/man1 PACKAGE_VERSION := @PACKAGE_VERSION@ PACKAGE_STRING := @PACKAGE_STRING@ -install_sh := @install_sh@ -executables := @executables@ +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) cc_version := $(shell $(CC) --version | head -n 1) -codename := spectral gravity GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h) @@ -34,24 +54,15 @@ object_dir := $(build_dir)/objects dep_dir := $(build_dir)/deps 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 @@ -67,7 +78,6 @@ CPPFLAGS += -Wchar-subscripts CPPFLAGS += -DBINDIR='"$(BINDIR)"' CPPFLAGS += -DBUILD_DATE='"$(build_date)"' CPPFLAGS += -DUNAME_RS='"$(uname_rs)"' -CPPFLAGS += -DCODENAME='"$(codename)"' CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -Werror-implicit-function-declaration CPPFLAGS += -Wmissing-noreturn @@ -81,13 +91,12 @@ CPPFLAGS += @osl_cppflags@ LDFLAGS += @clock_gettime_ldflags@ -man_pages := $(patsubst %, $(man_dir)/%.1, @executables@) +man_pages := $(patsubst %, $(man_dir)/%.1, $(executables)) autocrap := config.h.in configure tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION) tarball_delete := $(addprefix $(tarball_pfx)/,\ - web .changelog_before_cvs .changelog_cvs .gitignore\ - skencil) + web .changelog_before_cvs .changelog_cvs .gitignore) tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2 # To put more focus on warnings, be less verbose as default @@ -99,12 +108,13 @@ else endif .PHONY: dep all clean distclean maintainer-clean install man tarball -all: dep @executables@ $(man_pages) +all: dep $(executables) $(man_pages) dep: $(deps) man: $(man_pages) tarball: $(tarball) -$(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir): +$(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir) $(m4depdir) \ + $(help2man_dir) $(hostbin_dir): $(Q) $(MKDIR_P) $@ -include $(m4_ggo_dir)/makefile @@ -134,37 +144,43 @@ afs_command_list.h afs_command_list.man afs_completion.h: afs.c aft.c attribute. audiod_command_list.h audiod_command_list.man audiod_completion.h: audiod_command.c server_command_lists_man = server_command_list.man afs_command_list.man -$(man_dir)/para_server.1: para_server $(server_command_lists_man) | $(man_dir) +$(man_dir)/para_server.1: $(help2man_dir)/para_server $(server_command_lists_man) | $(man_dir) @[ -z "$(Q)" ] || echo 'MAN $<' - $(Q) opts="-h --detailed-help -N `for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \ - $(HELP2MAN) $$opts ./para_server > $@ + $(Q) opts="`for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \ + $(HELP2MAN) $$opts ./$< > $@ -$(man_dir)/para_audiod.1: para_audiod audiod_command_list.man | $(man_dir) +$(man_dir)/para_audiod.1: $(help2man_dir)/para_audiod audiod_command_list.man | $(man_dir) @[ -z "$(Q)" ] || echo 'MAN $<' - $(Q) $(HELP2MAN) -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@ + $(Q) $(HELP2MAN) -N -i audiod_command_list.man ./$< > $@ -$(man_dir)/para_play.1: para_play play_command_list.man | $(man_dir) +$(man_dir)/para_play.1: $(help2man_dir)/para_play play_command_list.man | $(man_dir) @[ -z "$(Q)" ] || echo 'MAN $<' - $(Q) $(HELP2MAN) -h --detailed-help -N -i play_command_list.man ./para_play > $@ + $(Q) $(HELP2MAN) -N -i play_command_list.man ./$< > $@ -$(man_dir)/%.1: % | $(man_dir) +$(man_dir)/%.1: $(help2man_dir)/% | $(man_dir) @[ -z "$(Q)" ] || echo 'MAN $<' - $(Q) $(HELP2MAN) -h --detailed-help -N ./$< > $@ - + $(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 $<' @@ -182,6 +198,10 @@ $(object_dir)/mp3dec_filter.o: mp3dec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $< +$(object_dir)/compress_filter.o: compress_filter.c | $(object_dir) + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) -O3 $< + $(object_dir)/aacdec_filter.o: aacdec_filter.c | $(object_dir) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< @@ -194,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 $<' @@ -223,10 +243,12 @@ $(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@)) recv_objs := $(addprefix $(object_dir)/, @recv_objs@) filter_objs := $(addprefix $(object_dir)/, @filter_objs@) @@ -242,8 +264,36 @@ play_objs := $(addprefix $(object_dir)/, @play_objs@) ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(deps) +-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) @@ -258,7 +308,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 $@' @@ -290,7 +340,7 @@ para_play: $(play_objs) clean: @[ -z "$(Q)" ] || echo 'CLEAN' - $(Q) rm -f @executables@ + $(Q) rm -f $(executables) $(Q) rm -rf $(object_dir) clean2: clean @@ -304,15 +354,13 @@ distclean: clean2 test-clean $(Q) rm -f GPATH GRTAGS GSYMS GTAGS maintainer-clean: distclean - rm -f *.tar.bz2 \ - config.h configure \ - config.h.in skencil/*.pdf skencil/*.ps + rm -f *.tar.bz2 config.h configure config.h.in rm -rf web_sync 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): @@ -326,9 +374,4 @@ $(tarball): bzip2 -9 $(tarball_pfx).tar ls -l $(tarball_pfx).tar.bz2 rm -rf $(tarball_pfx) -%.ps: %.sk - sk2ps $< > $@ -%.pdf: %.ps - ps2pdf - - < $< > $@ - include $(test_dir)/makefile.test