X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.real;h=6c7b38f2a1de7880b09d6bcce5ad65283dea8dff;hp=f391d26eb7ceee753c446557edff379adff08410;hb=56d75bd90d78cf44cd3984ce2a45627ef5646d38;hpb=fc16e6c98742b4ebe6d3130f0f56ac143806c084 diff --git a/Makefile.real b/Makefile.real index f391d26e..6c7b38f2 100644 --- a/Makefile.real +++ b/Makefile.real @@ -32,7 +32,7 @@ test_dir := t 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)) +deps := $(addprefix $(dep_dir)/, $(filter-out %.cmdline.d, $(all_objs:.o=.d))) m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, $(executables))) # now prefix all objects with object dir @@ -51,7 +51,7 @@ play_objs := $(addprefix $(object_dir)/, $(play_objs)) man_pages := $(patsubst %, $(man_dir)/%.1, $(prefixed_executables)) autocrap := config.h.in configure -tarball_pfx := $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) +tarball_pfx := $(PACKAGE_TARNAME)-$(GIT_VERSION) tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore) tarball := $(tarball_pfx).tar.bz2 @@ -188,13 +188,22 @@ error2.h: $(hostbin_dir)/error2 config.h $(object_dir)/%.o: %.c | $(object_dir) $(object_dir)/opus%.o $(dep_dir)/opus%.d: CPPFLAGS += $(opus_cppflags) -$(object_dir)/gui%.o $(dep_dir)/gui%.d: CPPFLAGS += $(curses_cppflags) +$(object_dir)/gui.o $(object_dir)/gui%.o $(dep_dir)/gui%.d \ +: CPPFLAGS += $(curses_cppflags) $(object_dir)/spx%.o $(dep_dir)/spx%.d: CPPFLAGS += $(speex_cppflags) +$(object_dir)/flac%.o $(dep_dir)/flac%.d: CPPFLAGS += $(flac_cppflags) + $(object_dir)/mp3_afh.o $(dep_dir)/mp3_afh.d: CPPFLAGS += $(id3tag_cppflags) $(object_dir)/crypt.o $(dep_dir)/crypt.d: CPPFLAGS += $(openssl_cppflags) $(object_dir)/gcrypt.o $(dep_dir)/gcrypt.d: CPPFLAGS += $(gcrypt_cppflags) $(object_dir)/ao_write.o $(dep_dir)/ao_write.d: CPPFLAGS += $(ao_cppflags) +$(object_dir)/interactive.o $(dep_dir)/interactive.d \ +: CPPFLAGS += $(readline_cppflags) + +$(object_dir)/resample_filter.o $(dep_dir)/resample_filter.d \ +: CPPFLAGS += $(samplerate_cppflags) + $(object_dir)/mp3dec_filter.o $(dep_dir)/mp3dec_filter.d \ : CPPFLAGS += $(mad_cppflags) @@ -244,15 +253,15 @@ $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $< -$(dep_dir)/%.cmdline.d: $(cmdline_dir)/%.cmdline.c error2.h | $(dep_dir) $(cmdlist_dir) - @[ -z "$(Q)" ] || echo 'DEP $<' - $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \ - $(cmdlist_dir) $(CPPFLAGS) $< > $@ - -$(dep_dir)/%.d: %.c error2.h | $(dep_dir) $(cmdlist_dir) +# The compiler outputs dependencies either as foo.h or as some_directory/foo.h, +# depending on whether the latter file exists. Since make needs the directory +# part we prefix the dependency as appropriate. +$(dep_dir)/%.d: %.c error2.h | $(dep_dir) @[ -z "$(Q)" ] || echo 'DEP $<' - $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \ - $(cmdlist_dir) $(CPPFLAGS) $< > $@ + $(Q) $(CC) $(CPPFLAGS) -MM -MG -MP -MT $@ -MT $(object_dir)/$(*F).o $< \ + | sed -e "s@ \([a-zA-Z0-9_]\{1,\}\.cmdline.h\)@ $(cmdline_dir)/\1@g" \ + -e "s@ \([a-zA-Z0-9_]\{1,\}\.command_list.h\)@ $(cmdlist_dir)/\1@g" \ + -e "s@ \([a-zA-Z0-9_]\{1,\}\.completion.h\)@ $(cmdlist_dir)/\1@g" > $@ para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags) para_write para_play para_audiod: LDFLAGS += $(ao_ldflags) $(core_audio_ldflags) @@ -311,7 +320,7 @@ $(prefixed_executables): clean: @[ -z "$(Q)" ] || echo 'CLEAN' - $(Q) rm -f $(prefixed_executables) + $(Q) rm -f para_* $(Q) rm -rf $(object_dir) clean2: clean @@ -320,12 +329,12 @@ clean2: clean distclean: clean2 test-clean @[ -z "$(Q)" ] || echo 'DISTCLEAN' $(Q) rm -f Makefile autoscan.log config.status config.log error2.h - $(Q) rm -rf autom4te.cache $(Q) rm -f GPATH GRTAGS GSYMS GTAGS maintainer-clean: distclean - rm -f *.tar.bz2 config.h configure config.h.in - rm -rf web_sync + @[ -z "$(Q)" ] || echo 'MAINTAINER-CLEAN' + $(Q) rm -f *.tar.bz2 config.h configure config.h.in + $(Q) rm -rf web_sync install: all man $(MKDIR_P) $(BINDIR) $(MANDIR) @@ -344,4 +353,5 @@ $(tarball): $(Q) tar rf $(tarball_pfx).tar $(tarball_pfx)/* $(Q) bzip2 -9 $(tarball_pfx).tar $(Q) ls -l $(tarball) + $(Q) ln -sf $(tarball) paraslash-git.tar.bz2 $(Q) rm -rf $(tarball_pfx)