aacdec: Introduce error_count
[paraslash.git] / Makefile.in
index 35dc669e4c7fb71ae79388472d52e70809cfb812..f7c7f1be4e65a87dc6b5b0d8fbb21232911e265f 100644 (file)
@@ -7,7 +7,6 @@ exec_prefix = @exec_prefix@
 BINDIR = @bindir@
 VARDIR = /var/paraslash
 PKGDATADIR = @datadir@/@PACKAGE_NAME@
-CONFDIR = $(PKGDATADIR)/samples
 FONTDIR = $(PKGDATADIR)/fonts
 PICDIR = $(PKGDATADIR)/pics
 MANDIR = @prefix@/share/man/man1
@@ -58,7 +57,6 @@ BINARIES = para_server para_client para_gui para_audiod para_audioc para_recv pa
 FONTS := $(wildcard fonts/*.png)
 PICS := $(wildcard pics/paraslash/*.jpg)
 MANS := $(wildcard doc/man/man1/*.1)
-sample_conf := $(wildcard *.conf.sample)
 gengetopts := $(wildcard *.ggo)
 gengetopts_c := $(gengetopts:.ggo=.cmdline.c)
 gengetopts_h := $(gengetopts:.ggo=.cmdline.h)
@@ -82,22 +80,19 @@ web_pics := web/sync/paraslash.png web/sync/paraslash.ico
 web_misc := demo-script overview.pdf versions/paraslash-git.tar.bz2 PUBLIC_KEY key.anonymous para.css doc
 web_misc := $(patsubst %,web/sync/%,$(web_misc))
 
-misc := bash_completion
-headers := para.h server.h SFont.h crypt.h list.h http.h send.h ortp.h rc4.h \
-       close_on_fork.h afs.h db.h gcc-compat.h recv.h filter.h audiod.h \
-       grab_client.h error.h net.h ringbuffer.h daemon.h string.h ipc.h dccp.h \
-       fd.h write.h write_common.h
-scripts := install-sh configure
-autocrap := Makefile.in config.h.in configure.ac autogen.sh
-tarball := web/sync/doc pics fonts $(c_sources) $(sample_conf) $(headers) \
-       $(misc) $(grutatxt) $(gengetopts) $(autocrap) $(gengetopts_c) $(gengetopts_h) \
-       $(scripts)
+autocrap := config.h.in configure
+
+tarball_pfx := @PACKAGE_TARNAME@-@PACKAGE_VERSION@
+
+tarball_delete = web versions pics/screenshots pics/web .changelog_before_cvs \
+       .changelog_cvs
+tarball_delete := $(patsubst %,$(tarball_pfx)/%,$(tarball_delete))
+tarball_add := $(gengetopts_c) $(gengetopts_h) $(autocrap)
 
 .PHONY: clean distclean maintainer-clean install html www tags ChangeLog doxygen
 all: $(BINARIES)
-www: $(gen_html) $(gruta_html) $(web_pics) $(web_misc) $(shots) tags doxygen
+www: $(gen_html) $(gruta_html) $(web_pics) $(web_misc) $(shots) tags doxygen doc
 
-client_objs = client.cmdline.o client.o net.o string.o crypt.o
 sdl_gui_objs = sdl_gui.cmdline.o SFont.o sdl_gui.o gui_common.o exec.o \
        close_on_fork.o string.o stat.o fd.o
 dbadm_objs = dbadm.o exec.o close_on_fork.o string.o
@@ -115,6 +110,7 @@ module_ggo_opts := --set-version="(@PACKAGE_STRING@, $(codename))"
 
 grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo
        gengetopt $(module_ggo_opts) \
+               -S \
                --set-package=grab \
                --no-handle-help \
                --no-handle-error \
@@ -136,6 +132,12 @@ grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo
                --arg-struct-name=$(subst .ggo,,$<)_args_info \
                --file-name=$(subst .ggo,,$<).cmdline \
                --func-name $(subst _filter.ggo,,$<)_cmdline_parser < $<
+%_write.cmdline.h %_write.cmdline.c: %_write.ggo
+       gengetopt -S $(module_ggo_opts) \
+               --set-package=$(subst .ggo,,$<) \
+               --arg-struct-name=$(subst .ggo,,$<)_args_info \
+               --file-name=$(subst .ggo,,$<).cmdline \
+               --func-name $(subst _write.ggo,,$<)_cmdline_parser < $<
 
 %.cmdline.h %.cmdline.c: %.ggo
        case $< in client.ggo) O="--unamed-opts=command";; \
@@ -143,6 +145,15 @@ grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo
        esac; \
        gengetopt $$O --conf-parser --file-name=$(*F).cmdline --set-package="para_$(subst .cmdline,,$(*F))" --set-version="$V"  < $<
 
+aacdec.o: aacdec.c
+       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
+
+aac_common.o: aac_common.c
+       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
+
+aac_afh.o: aac_afh.c
+       $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
+
 para_recv: @recv_objs@
        $(CC) @recv_objs@ -o $@ @recv_ldflags@
 
@@ -152,6 +163,9 @@ slider.o: slider.c
 krell.o: krell.c
        $(CC) -Wall -O -g -fPIC @GTK_CFLAGS@ -c -o $@ krell.c
 
+mysql_selector.o: mysql_selector.c
+       $(CC)  -Wall -O -g @mysql_cppflags@ -c -o $@ $<
+
 %.cmdline.o: %.cmdline.c
        $(CC) -c $(CPPFLAGS) $<
 %.o: %.c
@@ -163,8 +177,8 @@ para_filter: @filter_objs@
 para_slider: $(slider_objs)
        $(CC) $(slider_objs) -o $@ @GTK_LIBS@ @GLIB_LIBS@ -lzmw
 
-para_client: $(client_objs)
-       $(CC) -o $@ $(client_objs) $(SSL_LDFLAGS) $(SSL_LIBS)
+para_client: @client_objs@
+       $(CC) -o $@ @client_objs@ @client_ldflags@
 
 para_gui: @gui_objs@
        $(CC) -o $@ @gui_objs@ -lncurses
@@ -211,8 +225,6 @@ install: all
        umask 022 && \
        mkdir -p $(BINDIR) $(VARDIR) && \
        $(install_sh) -s -m 755 $(BINARIES) $(BINDIR) && \
-       mkdir -p $(CONFDIR) && \
-       $(install_sh) -m 644 bash_completion $(sample_conf) $(CONFDIR)
        mkdir -p $(FONTDIR) && \
        $(install_sh) -m 644 $(FONTS) $(FONTDIR) && \
        mkdir -p $(PICDIR) && \
@@ -220,15 +232,17 @@ install: all
        mkdir -p $(MANDIR) && \
        $(install_sh) -m 644 $(MANS) $(MANDIR)
 
-
-@PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.bz2: all $(gengetopts_c) $(tarball)
-       dir=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ &&\
-       mkdir -p $${dir} && \
-       cp -a $(tarball) $${dir} && \
-       find $${dir} -name "CVS" | xargs rm -rf && \
-       tar cpjf $@ $${dir} && \
-       rm -rf $${dir} && \
-       ls -l $@
+@PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.bz2: $(tarball_add) doc
+       rm -f $(tarball_pfx).tar.bz2
+       git-tar-tree HEAD $(tarball_pfx) | tar --delete $(tarball_delete) > $(tarball_pfx).tar
+       mkdir $(tarball_pfx)
+       cp -r $(tarball_add) $(tarball_pfx)
+       tar c doc/man | (cd $(tarball_pfx); tar x)
+       tar rf $(tarball_pfx).tar $(tarball_pfx)/*
+       rm -rf $(tarball_pfx)
+       bzip2 -9 $(tarball_pfx).tar
+       rm -f $(tarball_pfx).tar
+       ls -l $(tarball_pfx).tar.bz2
 
 ChangeLog:
        para_util changelog > $@
@@ -236,7 +250,7 @@ web/%.in.html: %
        grutatxt -nb < $< > $@
 tags:
        rm -rf web/sync/HTML && gtags && htags -nF && mv HTML web/sync
-web/sync/doc:
+doc:
        para_util doc
 web/header2.html: web/header.html
        sed -e 's|href="|href="\.\.\/\.\./|g' \
@@ -244,9 +258,10 @@ web/header2.html: web/header.html
 doxygen: web/header2.html
        mkdir -p web/sync/doxygen
        doxygen
+web/sync/doc: doc
+       cp -a $< $@
 web/sync/doxygen:
        mkdir -p $@
-web/sync/doxygen/index.html:
 web/sync/%.html: web/%.in.html web/header.html web/footer.html web/sync
        cat web/header.html $< web/footer.html > $@
 web/sync/%.png: pics/web/%.png web/sync
@@ -262,7 +277,7 @@ web/sync/versions/paraslash-git.tar.bz2: paraslash-git.tar.bz2 web/sync
 web/sync/overview.pdf: skencil/overview.pdf web/sync
        cp $< $@
 web/sync/%: %
-       cp $< $@
+       cp -a $< $@
 web/sync/%: pics/screenshots/%
        cp $< $@
 skencil/%.ps: skencil/%.sk