-
-BINARIES = para_server para_client para_gui para_audiod para_audioc para_recv para_filter para_write $(extra_binaries)
-
-FONTS := $(wildcard fonts/*.png)
-PICS := $(wildcard pics/paraslash/*.jpg)
-MANS := $(wildcard doc/man/man1/*.1)
-gengetopts := $(wildcard *.ggo)
-gengetopts_c := $(gengetopts:.ggo=.cmdline.c)
-gengetopts_h := $(gengetopts:.ggo=.cmdline.h)
-all_c_files := $(wildcard *.c)
-c_sources := $(filter-out $(gengetopts_c), $(all_c_files))
-grutatxt := COPYING NEWS README.mysql CREDITS INSTALL README \
- FEATURES GPL
-grutatxt_html := $(grutatxt:=.html)
-html_in := $(wildcard web/*.in.html)
-gen_html := $(subst web/,web/sync/,$(html_in))
-gen_html := $(gen_html:.in.html=.html)
-gruta_in := $(grutatxt:=.in.html)
-gruta_in := $(patsubst %,web/%,$(gruta_in))
-gruta_html := $(grutatxt:=.html)
-gruta_html := $(patsubst %,web/sync/%,$(gruta_html))
-shots := gui-2005-11-12.png para_audiod-startup.txt
-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 := $(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) $(headers) \
- $(misc) $(grutatxt) $(gengetopts) $(autocrap) $(gengetopts_c) $(gengetopts_h) \
- $(scripts)
-
-.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
-
-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
-fade_objs = fade.cmdline.o fade.o exec.o close_on_fork.o string.o fd.o
-krell_objs = krell.o string.o
-slider_objs = slider.o string.o
-audioc_objs = audioc.cmdline.o audioc.o string.o net.o fd.o
+CPPFLAGS += -Wbad-function-cast
+CPPFLAGS += -fno-strict-aliasing
+CPPFLAGS += -DMAIN_INPUT_FILE_IS_$(*F)
+CPPFLAGS += @SSL_CPPFLAGS@
+CPPFLAGS += @ncurses_cppflags@
+CPPFLAGS += @arch_cppflags@
+
+BINARIES = para_server para_client para_audioc para_recv \
+ para_filter para_write para_fsck para_afh @extra_binaries@
+man_binaries := $(BINARIES)
+man_pages := $(patsubst %, man/man1/%.1, $(man_binaries))
+man_pages_in := $(patsubst %, web/%.man.in.html, $(man_binaries))
+
+ggo_dir := ggo
+
+m4_ggos := afh audioc audiod client filter fsck gui recv server write
+all_ggos := $(m4_ggos) dccp_recv oggdec_filter alsa_write oss_write fade http_recv \
+ osx_write udp_recv amp_filter compress_filter file_write \
+ grab_client mp3dec_filter
+ggo_generated := $(addsuffix .cmdline.c, $(all_ggos)) $(addsuffix .cmdline.h, $(all_ggos)) \
+ $(addsuffix .ggo, $(addprefix $(ggo_dir)/,$(m4_ggos)))
+
+autocrap := config.h.in configure
+tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION)
+tarball_delete = web versions pics .changelog_before_cvs .changelog_cvs .gitignore
+tarball_delete := $(patsubst %,$(tarball_pfx)/%,$(tarball_delete))
+tarball_add := $(ggo_generated) $(autocrap)
+tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2
+
+.PHONY: clean distclean maintainer-clean install man tarball
+all: $(BINARIES) $(man_pages)
+man: $(man_pages)
+tarball: $(tarball)