]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Use separate directory for objects.
authorAndre Noll <maan@systemlinux.org>
Wed, 30 Sep 2009 19:27:43 +0000 (21:27 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 30 Sep 2009 19:27:43 +0000 (21:27 +0200)
Makefile.in
configure.ac
ggo/makefile

index ddf3be449d50744e394eb93395254a910c5eb4e3..9556cff22fd2352d5c5cd98af57d2a6cff4052db 100644 (file)
@@ -67,6 +67,7 @@ man_pages := $(patsubst %, man/man1/%.1, $(man_binaries))
 man_pages_in := $(patsubst %, web/%.man.in.html, $(man_binaries))
 
 ggo_dir := ggo
 man_pages_in := $(patsubst %, web/%.man.in.html, $(man_binaries))
 
 ggo_dir := ggo
+object_dir := objects
 
 m4_ggos := afh audioc audiod client filter gui recv server write
 all_ggos := $(m4_ggos) dccp_recv oggdec_filter alsa_write oss_write fade http_recv \
 
 m4_ggos := afh audioc audiod client filter gui recv server write
 all_ggos := $(m4_ggos) dccp_recv oggdec_filter alsa_write oss_write fade http_recv \
@@ -83,13 +84,11 @@ tarball_delete := $(addprefix $(tarball_pfx)/,\
        $(ggo_dir) skencil)
 tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2
 
        $(ggo_dir) skencil)
 tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2
 
-.PHONY: clean distclean maintainer-clean install man tarball
+.PHONY: all clean distclean maintainer-clean install man tarball
 all: $(BINARIES) $(man_pages)
 man: $(man_pages)
 tarball: $(tarball)
 
 all: $(BINARIES) $(man_pages)
 man: $(man_pages)
 tarball: $(tarball)
 
-*.o: para.h config.h gcc-compat.h
-
 Makefile.deps: $(wildcard *.c *.h) $(cmdline_generated)
        gcc -MM -MG -I$(cmdline_dir) @faad_cppflags@ @mad_cppflags@ @oggvorbis_cppflags@ *.c > $@
 -include Makefile.deps
 Makefile.deps: $(wildcard *.c *.h) $(cmdline_generated)
        gcc -MM -MG -I$(cmdline_dir) @faad_cppflags@ @mad_cppflags@ @oggvorbis_cppflags@ *.c > $@
 -include Makefile.deps
@@ -125,68 +124,81 @@ man/html/%.html: man/man1/%.1
 web/%.man.in.html: man/man1/%.1
        man2html $< | sed -e '/^<\/BODY>/,$$d' -e '1,/<\/HEAD><BODY>/d' > $@
 
 web/%.man.in.html: man/man1/%.1
        man2html $< | sed -e '/^<\/BODY>/,$$d' -e '1,/<\/HEAD><BODY>/d' > $@
 
+$(object_dir):
+       mkdir -p $@
+
+$(object_dir)/oggdec_filter.o: oggdec_filter.c | $(object_dir)
+       $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
 
 
-oggdec_filter.o: oggdec_filter.c
-       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
-ogg_afh.o: ogg_afh.c
-       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
+$(object_dir)/ogg_afh.o: ogg_afh.c | $(object_dir)
+       $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
 
 
-mp3dec_filter.o: mp3dec_filter.c
-       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $<
+$(object_dir)/mp3dec_filter.o: mp3dec_filter.c | $(object_dir)
+       $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $<
 
 
-aacdec_filter.o: aacdec_filter.c
-       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
+$(object_dir)/aacdec_filter.o: aacdec_filter.c | $(object_dir)
+       $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
 
 
-aac_common.o: aac_common.c
-       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
+$(object_dir)/aac_common.o: aac_common.c | $(object_dir)
+       $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
 
 
-aac_afh.o: aac_afh.c
-       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
+$(object_dir)/aac_afh.o: aac_afh.c | $(object_dir)
+       $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
 
 
-$(cmdline_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c
-       @mkdir -p $(cmdline_dir)
+$(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c | $(object_dir)
        $(CC) -c $(CPPFLAGS) -o $@ $<
 
        $(CC) -c $(CPPFLAGS) -o $@ $<
 
-%.o: %.c
-       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
+$(object_dir)/%.o: %.c | $(object_dir)
+       $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
+
+recv_objs := $(addprefix $(object_dir)/, @recv_objs@)
+filter_objs := $(addprefix $(object_dir)/, @filter_objs@)
+client_objs := $(addprefix $(object_dir)/, @client_objs@)
+gui_objs := $(addprefix $(object_dir)/, @gui_objs@)
+audiod_objs := $(addprefix $(object_dir)/, @audiod_objs@)
+audioc_objs := $(addprefix $(object_dir)/, @audioc_objs@)
+fade_objs := $(addprefix $(object_dir)/, @fade_objs@)
+server_objs := $(addprefix $(object_dir)/, @server_objs@)
+write_objs := $(addprefix $(object_dir)/, @write_objs@)
+afh_objs := $(addprefix $(object_dir)/, @afh_objs@)
 
 
-para_recv: @recv_objs@
-       $(CC) $(LDFLAGS) @recv_objs@ -o $@ @recv_ldflags@
+para_recv: $(recv_objs)
+       $(CC) $(LDFLAGS) $(recv_objs) -o $@ @recv_ldflags@
 
 
-para_filter: @filter_objs@
-       $(CC) $(LDFLAGS) @filter_objs@ -o $@ @filter_ldflags@
+para_filter: $(filter_objs)
+       $(CC) $(LDFLAGS) $(filter_objs) -o $@ @filter_ldflags@
 
 
-para_client: @client_objs@
-       $(CC) $(LDFLAGS) -o $@ @client_objs@ @client_ldflags@
+para_client: $(client_objs)
+       $(CC) $(LDFLAGS) -o $@ $(client_objs) @client_ldflags@
 
 
-para_gui: @gui_objs@
-       $(CC) $(LDFLAGS) -o $@ @gui_objs@ -lncurses
+para_gui: $(gui_objs)
+       $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lncurses
 
 
-para_audiod: @audiod_objs@ audiod_command_list.c audiod_command_list.h
-       $(CC) $(LDFLAGS) -o $@ @audiod_objs@ @audiod_ldflags@
+para_audiod: audiod_command_list.c audiod_command_list.h $(audiod_objs)
+       $(CC) $(LDFLAGS) -o $@ $(audiod_objs) @audiod_ldflags@
 
 
-para_audioc: @audioc_objs@
-       $(CC) $(LDFLAGS) -o $@ @audioc_objs@ @audioc_ldflags@
+para_audioc: $(audioc_objs)
+       $(CC) $(LDFLAGS) -o $@ $(audioc_objs) @audioc_ldflags@
 
 
-para_fade: @fade_objs@
-       $(CC) $(LDFLAGS) -o $@ @fade_objs@ @fade_ldflags@
+para_fade: $(fade_objs)
+       $(CC) $(LDFLAGS) -o $@ $(fade_objs) @fade_ldflags@
 
 
-para_server: @server_objs@ $(server_command_lists_ch)
-       $(CC) $(LDFLAGS) -o $@ @server_objs@  @server_ldflags@
+para_server: $(server_command_lists_ch) $(server_objs)
+       $(CC) $(LDFLAGS) -o $@ $(server_objs)  @server_ldflags@
 
 
-para_write: @write_objs@
-       $(CC) $(LDFLAGS) -o $@ @write_objs@ @write_ldflags@
+para_write: $(write_objs)
+       $(CC) $(LDFLAGS) -o $@ $(write_objs) @write_ldflags@
 
 
-para_afh: @afh_objs@
-       $(CC) $(LDFLAGS) -o $@ @afh_objs@ @afh_ldflags@
+para_afh: $(afh_objs)
+       $(CC) $(LDFLAGS) -o $@ $(afh_objs) @afh_ldflags@
 
 clean:
 
 clean:
-       rm -f *.o $(BINARIES)
+       rm -f $(BINARIES)
        rm -f *_command_list.*
        rm -f *_command_list.*
-       rm -rf man
+       rm -rf man $(object_dir)
 distclean: clean
        rm -f Makefile autoscan.log config.status config.log && \
 distclean: clean
        rm -f Makefile autoscan.log config.status config.log && \
-       rm -rf web/sync/* autom4te.cache aclocal.m4
+       rm -rf cmdline autom4te.cache aclocal.m4
        rm -f GPATH GRTAGS GSYMS GTAGS
 
 maintainer-clean: distclean
        rm -f GPATH GRTAGS GSYMS GTAGS
 
 maintainer-clean: distclean
index 4cb283d26092ca87923162e86a9655d4f0993be5..1707f8230b81d06398ed2af79efa88182bd7ef15 100644 (file)
@@ -80,7 +80,7 @@ AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
 
 cmdline_dir="cmdline"
 AC_SUBST(cmdline_dir)
 
 cmdline_dir="cmdline"
 AC_SUBST(cmdline_dir)
-AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${cmdline_dir}/${i}.cmdline "; done)])
+AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
 
 
 all_errlist_objs="server mp3_afh afh_common vss command net string signal time
 
 
 all_errlist_objs="server mp3_afh afh_common vss command net string signal time
index c3cae89f85380cf36e7ab05db2889c75cb335ffa..4d40eddae2d3ce4052d27a17429f26a24fdcd176 100644 (file)
@@ -1,7 +1,8 @@
 module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
 module_ggo_opts := --set-version="($(PACKAGE_STRING), $(codename))"
+$(cmdline_dir):
+       mkdir -p $(cmdline_dir)
 
 
-$(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo
-       @mkdir -p $(cmdline_dir)
+$(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo | $(cmdline_dir)
        gengetopt $(module_ggo_opts) \
                --output-dir=$(cmdline_dir) \
                --set-package=$(subst .ggo,,$(<F)) \
        gengetopt $(module_ggo_opts) \
                --output-dir=$(cmdline_dir) \
                --set-package=$(subst .ggo,,$(<F)) \
@@ -9,16 +10,14 @@ $(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_re
                --file-name=$(subst .ggo,,$(<F)).cmdline \
                --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
 
                --file-name=$(subst .ggo,,$(<F)).cmdline \
                --func-name $(subst .ggo,,$(<F))_cmdline_parser < $<
 
-$(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/%_filter.ggo
-       @mkdir -p $(cmdline_dir)
+$(cmdline_dir)/%_filter.cmdline.h $(cmdline_dir)/%_filter.cmdline.c: $(ggo_dir)/%_filter.ggo | $(cmdline_dir)
        gengetopt $(module_ggo_opts) \
                --output-dir=$(cmdline_dir) \
                --set-package=$(subst .ggo,,$(<F)) \
                --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
                --file-name=$(subst .ggo,,$(<F)).cmdline \
                --func-name=$(subst _filter.ggo,,$(<F))_cmdline_parser < $<
        gengetopt $(module_ggo_opts) \
                --output-dir=$(cmdline_dir) \
                --set-package=$(subst .ggo,,$(<F)) \
                --arg-struct-name=$(subst .ggo,,$(<F))_args_info \
                --file-name=$(subst .ggo,,$(<F)).cmdline \
                --func-name=$(subst _filter.ggo,,$(<F))_cmdline_parser < $<
-$(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_write.ggo
-       @mkdir -p $(cmdline_dir)
+$(cmdline_dir)/%_write.cmdline.h $(cmdline_dir)/%_write.cmdline.c: $(ggo_dir)/%_write.ggo | $(cmdline_dir)
        gengetopt -S $(module_ggo_opts) \
                --output-dir=$(cmdline_dir) \
                --set-package=$(subst .ggo,,$(<F)) \
        gengetopt -S $(module_ggo_opts) \
                --output-dir=$(cmdline_dir) \
                --set-package=$(subst .ggo,,$(<F)) \
@@ -40,8 +39,7 @@ $(if $(filter fsck,$(*F)), --unamed-opts=table, --conf-parser)\
 --set-version="$(PACKAGE_VERSION)"
 endef
 
 --set-version="$(PACKAGE_VERSION)"
 endef
 
-$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo
-       @mkdir -p $(cmdline_dir)
+$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo | $(cmdline_dir)
        gengetopt $(ggo-opts) < $<
 
 $(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
        gengetopt $(ggo-opts) < $<
 
 $(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \