-COPYRIGHT = Copyright (c) 1997-2006 by Andre Noll
+COPYRIGHT = Copyright (c) 1997-2007 by Andre Noll
DISCLAIMER = This is free software with ABSOLUTELY NO WARRANTY. See COPYING for details.
prefix = @prefix@
build_date = $(shell date)
system = $(shell uname -rs)
cc_version = $(shell $(CC) --version | head -n 1)
-codename = transient singularity
+codename = inductive resonance
DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
CPPFLAGS += -Wunused-macros
CPPFLAGS += -Wshadow
-BINARIES = para_server para_client para_gui para_audiod para_audioc para_recv para_filter para_write @extra_binaries@
+BINARIES = para_server para_client para_gui para_audioc para_recv para_filter para_write @extra_binaries@
FONTS := $(wildcard fonts/*.png)
PICS := $(wildcard pics/paraslash/*.jpg)
shots += para_slider-2004-12.png sdl_gui.jpg para_krell-2005-02.png
shots := $(patsubst %,web/sync/%,$(shots))
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 := overview.pdf versions/paraslash-git.tar.bz2 PUBLIC_KEY key.anonymous para.css doc
web_misc := $(patsubst %,web/sync/%,$(web_misc))
autocrap := config.h.in configure
--set-package="para_$(subst .cmdline,,$(*F))" \
--set-version="$V" < $<
+%_command_list.c %_command_list.h: %.cmd
+ ./command_util.sh c < $< >$@
+ ./command_util.sh h < $< >$(@:%.c=%.h)
+
+%_command_list.man: %.cmd
+ ./command_util.sh man < $< > $@
+
+server_command_lists = server_command_list.man random_selector_command_list.man \
+ playlist_selector_command_list.man mysql_selector_command_list.man
+man/man1/para_server.1: para_server $(server_command_lists)
+ opts="-N `for i in $(server_command_lists); do echo "-i $$i"; done`"; \
+ help2man $$opts ./para_server > $@
+
+man/man1/para_audiod.1: para_audiod audiod_command_list.man
+ help2man -N -i audiod_command_list.man ./para_audiod > $@
+
+man/man1/%.1: %
+ help2man -N $< > $@
+
+man/html/%.html: man/man1/%.1
+ man2html $< > $@
+
+
+
+ortp_recv.o: ortp_recv.c
+ $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ortp_cppflags@ $<
+
+ortp_send.o: ortp_send.c
+ $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ortp_cppflags@ $<
+
+oggdec.o: oggdec.c
+ $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
+ogg_afh.o: ogg_afh.c
+ $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
+
+mp3dec.o: mp3dec.c
+ $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $<
+
aacdec.o: aacdec.c
$(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $<
clean:
rm -f *.o $(BINARIES)
-
distclean: clean
rm -f Makefile autoscan.log config.status config.log && \
rm -rf web/sync/* autom4te.cache aclocal.m4
$(grutatxt_html) ChangeLog* config.h configure \
config.h.in skencil/*.pdf skencil/*.ps
rm -rf doc
+ rm -f *_command_list.* *.man man/man1/* man/html/*
+
install: all
umask 022 && \
- mkdir -p $(BINDIR) $(VARDIR) && \
+ mkdir -p $(BINDIR) && \
$(install_sh) -s -m 755 $(BINARIES) $(BINDIR) && \
mkdir -p $(FONTDIR) && \
$(install_sh) -m 644 $(FONTS) $(FONTDIR) && \
mkdir -p $(PICDIR) && \
$(install_sh) -m 644 $(PICS) $(PICDIR) && \
mkdir -p $(MANDIR) && \
- $(install_sh) -m 644 $(MANS) $(MANDIR)
+ $(install_sh) -m 644 $(MANS) $(MANDIR) \
+ mkdir -p $(VARDIR) > /dev/null 2>&1 || exit 0
@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
+ git-archive --format=tar --prefix=$(tarball_pfx)/ HEAD | 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)
cp $< $@
web/sync/%.ico: pics/web/%.ico web/sync
cp $< $@
-web/sync/demo-script: scripts/demo-script web/sync
- cp $< $@
web/sync/para.css: web/para.css web/sync
cp $< $@
web/sync/versions/paraslash-git.tar.bz2: paraslash-git.tar.bz2 web/sync