para_server: switch to generated command list
[paraslash.git] / Makefile.in
index 2c47a2cdabe9abce63cfdbf15f520476350c5b00..e05d75b90ff944a2e3d3ec0b45944e7a1765f295 100644 (file)
@@ -6,7 +6,7 @@ exec_prefix = @exec_prefix@
 
 BINDIR = @bindir@
 VARDIR = /var/paraslash
-PKGDATADIR = @datadir@/@PACKAGE_NAME@
+PKGDATADIR = @datarootdir@/@PACKAGE_NAME@
 FONTDIR = $(PKGDATADIR)/fonts
 PICDIR = $(PKGDATADIR)/pics
 MANDIR = @datarootdir@/man/man1
@@ -16,8 +16,7 @@ install_sh = @install_sh@
 build_date = $(shell date)
 system = $(shell uname -rs)
 cc_version = $(shell $(CC) --version | head -n 1)
-version = @PACKAGE_VERSION@
-codename = oriented abstraction
+codename = inductive resonance
 
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 
@@ -42,7 +41,6 @@ CPPFLAGS += -DFONTDIR='"$(PKGDATADIR)/fonts"'
 CPPFLAGS += -DPICDIR='"$(PKGDATADIR)/pics"'
 CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
 CPPFLAGS += -DSYSTEM='"$(system)"'
-CPPFLAGS += -DVERSION='"$(version)"'
 CPPFLAGS += -DCODENAME='"$(codename)"'
 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
 CPPFLAGS += -Werror-implicit-function-declaration
@@ -50,7 +48,7 @@ CPPFLAGS += -Wmissing-format-attribute
 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)
@@ -75,7 +73,7 @@ shots += para_krell-2005-02.png para_server-startup.txt
 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
@@ -150,6 +148,32 @@ grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo
                --set-package="para_$(subst .cmdline,,$(*F))" \
                --set-version="$V"  < $<
 
+server_command_list.c: server.cmd
+       echo '#include "server.h"' > $@
+       echo '#include "user_list.h"' >> $@
+       echo '#include "server_command_list.h"' >> $@
+       echo 'struct server_command cmd_struct[] = {' >>$@
+       ./command_util.sh array < $< >>$@
+       echo '{.name = NULL}};' >> $@
+
+server_command_list.h: server.cmd
+       echo 'extern struct server_command cmd_struct[];' > $@
+       ./command_util.sh proto < $< >> $@
+
+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@ $<
 
@@ -213,7 +237,7 @@ para_krell.so: $(krell_objs)
        $(CC) -Wall -fPIC @GTK_CFLAGS@ krell.o -o $@ @GTK_LIBS@ -shared
 
 clean:
-       rm -f *.o $(BINARIES)
+       rm -f *.o $(BINARIES) *_command_list.*
 
 distclean: clean
        rm -f Makefile autoscan.log config.status config.log && \
@@ -228,18 +252,19 @@ maintainer-clean: distclean
 
 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)
@@ -273,8 +298,6 @@ web/sync/%.png: pics/web/%.png web/sync
        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