add documentation of struct plm_client_data
[paraslash.git] / Makefile.in
1 COPYRIGHT = Copyright (c) 1997-2006 by Andre Noll
2 DISCLAIMER = This is free software with ABSOLUTELY NO WARRANTY. See COPYING for details.
3
4 prefix = @prefix@
5 exec_prefix = @exec_prefix@
6
7 BINDIR = @bindir@
8 VARDIR = /var/paraslash
9 PKGDATADIR = @datadir@/@PACKAGE_NAME@
10 CONFDIR = $(PKGDATADIR)/samples
11 FONTDIR = $(PKGDATADIR)/fonts
12 PICDIR = $(PKGDATADIR)/pics
13 MANDIR = @prefix@/share/man/man1
14
15 install_sh = @install_sh@
16 SSL_LIBS = @SSL_LIBS@
17 SSL_LDFLAGS = @SSL_LDFLAGS@
18
19 extra_binaries = @extra_binaries@
20 build_date = $(shell date)
21 system = $(shell uname -rs)
22 cc_version = $(shell $(CC) --version | head -n 1)
23 version = @PACKAGE_VERSION@
24 codename = atomic duality
25
26 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
27
28 # produces lots of warnings on older debian systems with gcc-2.95.4
29 # DEBUG_CPPFLAGS += -Wredundant-decls
30
31 # produces false positives
32 # DEBUG_CPPFLAGS += -Wunreachable-code
33
34 # invalid options for gcc-2.95.4
35 # CPPFLAGS += -Wfloat-equal
36 # CPPFLAGS += -Wmissing-format-attribute
37 # CPPFLAGS += -Wunused-macros
38
39 # invalid option for gcc-3.3.5
40 # CPPFLAGS += -Wextra
41
42 CPPFLAGS += -Os
43 CPPFLAGS += -Wall
44 CPPFLAGS += -Wuninitialized
45 CPPFLAGS += -Wstrict-prototypes
46 CPPFLAGS += -Wchar-subscripts
47 CPPFLAGS += -Wformat-security
48 CPPFLAGS += -DBINDIR='"$(BINDIR)"'
49 CPPFLAGS += -DFONTDIR='"$(PKGDATADIR)/fonts"'
50 CPPFLAGS += -DPICDIR='"$(PKGDATADIR)/pics"'
51 CPPFLAGS += -DBUILD_DATE='"$(build_date)"'
52 CPPFLAGS += -DSYSTEM='"$(system)"'
53 CPPFLAGS += -DVERSION='"$(version)"'
54 CPPFLAGS += -DCODENAME='"$(codename)"'
55 CPPFLAGS += -DCC_VERSION='"$(cc_version)"'
56 CPPFLAGS += -Werror-implicit-function-declaration
57
58 BINARIES = para_server para_client para_gui para_audiod para_audioc para_recv para_filter $(extra_binaries)
59
60 FONTS := $(wildcard fonts/*.png)
61 PICS := $(wildcard pics/paraslash/*.jpg)
62 MANS := $(wildcard doc/man/man1/*.1)
63 sample_conf := $(wildcard *.conf.sample)
64 gengetopts := $(wildcard *.ggo)
65 gengetopts_c := $(gengetopts:.ggo=.cmdline.c)
66 gengetopts_h := $(gengetopts:.ggo=.cmdline.h)
67 all_c_files := $(wildcard *.c)
68 c_sources := $(filter-out $(gengetopts_c), $(all_c_files))
69 grutatxt := COPYING ChangeLog NEWS README.mysql CREDITS INSTALL README \
70 FEATURES GPL
71 grutatxt_html := $(grutatxt:=.html)
72 html_in := $(wildcard web/*.in.html)
73 gen_html := $(subst web/,web/sync/,$(html_in))
74 gen_html := $(gen_html:.in.html=.html)
75 gruta_in := $(grutatxt:=.in.html)
76 gruta_in := $(patsubst %,web/%,$(gruta_in))
77 gruta_html := $(grutatxt:=.html)
78 gruta_html := $(patsubst %,web/sync/%,$(gruta_html))
79 shots := gui-2005-11-12.png para_audiod-startup.txt
80 shots += para_krell-2005-02.png para_server-startup.txt
81 shots += para_slider-2004-12.png sdl_gui.jpg para_krell-2005-02.png
82 shots := $(patsubst %,web/sync/%,$(shots))
83 web_pics := web/sync/paraslash.png web/sync/paraslash.ico
84 web_misc := demo-script overview.pdf versions/paraslash-git.tar.bz2 PUBLIC_KEY key.anonymous para.css doc
85 web_misc := $(patsubst %,web/sync/%,$(web_misc))
86
87 misc := bash_completion
88 headers := para.h server.h SFont.h crypt.h list.h http.h send.h ortp.h rc4.h \
89 close_on_fork.h afs.h db.h gcc-compat.h recv.h filter.h audiod.h \
90 grab_client.h error.h net.h ringbuffer.h daemon.h string.h
91 scripts := install-sh configure
92 autocrap := Makefile.in config.h.in configure.ac autogen.sh
93 tarball := web/sync/doc pics fonts $(c_sources) $(sample_conf) $(headers) \
94 $(misc) $(grutatxt) $(gengetopts) $(autocrap) $(gengetopts_c) $(gengetopts_h) \
95 $(scripts)
96
97 .PHONY: clean distclean maintainer-clean install html www tags ChangeLog doxygen
98 all: $(BINARIES)
99 www: $(gen_html) $(gruta_html) $(web_pics) $(web_misc) $(shots) tags doxygen
100
101 client_objs = client.cmdline.o client.o net.o string.o crypt.o
102 gui_objs = gui.cmdline.o gui.o gui_common.o exec.o close_on_fork.o signal.o string.o gui_theme.o stat.o ringbuffer.o
103 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
104 dbadm_objs = dbadm.o exec.o close_on_fork.o string.o
105 fade_objs = fade.cmdline.o fade.o exec.o close_on_fork.o string.o
106 krell_objs = krell.o string.o
107 slider_objs = slider.o string.o
108 audioc_objs = audioc.cmdline.o audioc.o string.o net.o
109 play_objs = play.cmdline.o play.o time.o
110
111 *.o: para.h config.h gcc-compat.h
112
113 include Makefile.deps
114
115 V := ($(TGZ_PREFIX)@PACKAGE_STRING@, $(codename))\n$(COPYRIGHT)\n$(DISCLAIMER)
116 module_ggo_opts := --set-version="" --set-package=""
117
118 grab_client.cmdline.h grab_client.cmdline.c: grab_client.ggo
119 gengetopt $(module_ggo_opts) \
120 --no-handle-error \
121 --no-handle-help \
122 --arg-struct-name=grab_client_args_info \
123 --file-name=$(subst .ggo,,$<).cmdline \
124 --func-name $(subst .ggo,,$<)_cmdline_parser < $<
125 grep -v 'fprintf\ *(stderr' $(subst .ggo,,$<).cmdline.c > $(subst .ggo,,$<).tmp
126 mv $(subst .ggo,,$<).tmp $(subst .ggo,,$<).cmdline.c
127 ggo_help GRAB_HELP_TXT < grab_client.ggo >> $(subst .ggo,,$<).cmdline.h
128
129 %_recv.cmdline.h %_recv.cmdline.c: %_recv.ggo
130 gengetopt $(module_ggo_opts) \
131 --file-name=$(subst .ggo,,$<).cmdline \
132 --func-name $(subst .ggo,,$<)_cmdline_parser < $<
133
134 %_filter.cmdline.h %_filter.cmdline.c: %_filter.ggo
135 gengetopt $(module_ggo_opts) \
136 --file-name=$(subst .ggo,,$<).cmdline \
137 --func-name $(subst _filter.ggo,,$<)_cmdline_parser < $<
138
139 %.cmdline.h %.cmdline.c: %.ggo
140 case $< in client.ggo) O="--unamed-opts=command";; \
141 audioc.ggo) O="--unamed-opts=command";; \
142 esac; \
143 gengetopt $$O --conf-parser --file-name=$(*F).cmdline --set-package="para_$(subst .cmdline,,$(*F))" --set-version="$V" < $<
144
145 ortp_send.o: ortp_send.c
146 $(CC) -c -Wall -o $@ -g @GLIB_CFLAGS@ $<
147 ortp_recv.o: ortp_recv.c
148 $(CC) -c -Wall -o $@ -g @GLIB_CFLAGS@ $<
149
150 para_recv: @recv_objs@
151 $(CC) @recv_objs@ -o $@ @recv_ldflags@
152
153 slider.o: slider.c
154 $(CC) -c -Wall -o $@ -g @GLIB_CFLAGS@ @GTK_CFLAGS@ $<
155
156 krell.o: krell.c
157 $(CC) -Wall -O -g -fPIC @GTK_CFLAGS@ -c -o $@ krell.c
158
159 %.cmdline.o: %.cmdline.c
160 $(CC) -c $(CPPFLAGS) $<
161 %.o: %.c
162 $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) $<
163
164 para_filter: @filter_objs@
165 $(CC) @filter_objs@ -o $@ @filter_ldflags@
166
167 para_slider: $(slider_objs)
168 $(CC) $(slider_objs) -o $@ @GTK_LIBS@ @GLIB_LIBS@ -lzmw
169
170 para_client: $(client_objs)
171 $(CC) -o $@ $(client_objs) $(SSL_LDFLAGS) -lreadline -lncurses $(SSL_LIBS)
172
173 para_gui: $(gui_objs)
174 $(CC) -o $@ $(gui_objs) -lncurses
175
176 para_audiod: @audiod_objs@
177 $(CC) -o $@ @audiod_objs@ @audiod_ldflags@
178
179 para_audioc: $(audioc_objs)
180 $(CC) -o $@ $(audioc_objs)
181
182 para_dbadm: $(dbadm_objs)
183 $(CC) -o $@ $(dbadm_objs) -lncurses -lmenu
184
185 para_fade: $(fade_objs)
186 $(CC) -o $@ $(fade_objs)
187
188 para_server: @server_objs@
189 $(CC) -o $@ @server_objs@ @server_ldflags@
190
191 para_sdl_gui: $(sdl_gui_objs)
192 $(CC) -o $@ $(sdl_gui_objs) -lSDL_image
193
194 para_play: $(play_objs)
195 $(CC) -o $@ $(play_objs) -lasound
196
197 para_compress: $(compress_objs)
198 $(CC) -o $@ $(compress_objs)
199
200 para_krell.so: $(krell_objs)
201 $(CC) -Wall -fPIC @GTK_CFLAGS@ krell.o -o $@ @GTK_LIBS@ -shared
202
203 clean:
204 rm -f *.o $(BINARIES)
205
206 distclean: clean
207 rm -f Makefile autoscan.log config.status config.log && \
208 rm -rf web/sync/* autom4te.cache aclocal.m4
209 rm -f GPATH GRTAGS GSYMS GTAGS
210
211 maintainer-clean: distclean
212 rm -f $(gengetopts_c) $(gengetopts_h) *.tar.bz2 \
213 $(grutatxt_html) ChangeLog* config.h configure \
214 config.h.in
215
216 install: all
217 umask 022 && \
218 mkdir -p $(BINDIR) $(VARDIR) $(VARDIR)/fifo && \
219 $(install_sh) -s -m 755 $(BINARIES) $(BINDIR) && \
220 mkdir -p $(CONFDIR) && \
221 $(install_sh) -m 644 bash_completion $(sample_conf) $(CONFDIR)
222 mkdir -p $(FONTDIR) && \
223 $(install_sh) -m 644 $(FONTS) $(FONTDIR) && \
224 mkdir -p $(PICDIR) && \
225 $(install_sh) -m 644 $(PICS) $(PICDIR) && \
226 mkdir -p $(MANDIR) && \
227 $(install_sh) -m 644 $(MANS) $(MANDIR)
228
229
230 @PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.bz2: all $(gengetopts_c) $(tarball)
231 dir=@PACKAGE_TARNAME@-@PACKAGE_VERSION@ &&\
232 mkdir -p $${dir} && \
233 cp -a $(tarball) $${dir} && \
234 find $${dir} -name "CVS" | xargs rm -rf && \
235 tar cpjf $@ $${dir} && \
236 rm -rf $${dir} && \
237 ls -l $@
238
239 ChangeLog:
240 para_util changelog > $@
241 web/%.in.html: %
242 grutatxt -nb < $< > $@
243 tags:
244 rm -rf web/sync/HTML && gtags && htags -nF && mv HTML web/sync
245 web/sync/doc:
246 para_util doc
247 web/header2.html: web/header.html
248 sed -e 's|href="|href="\.\.\/\.\./|g' \
249 -e 's|SRC="|SRC="\.\.\/\.\./|g' $< > $@
250 doxygen: web/header2.html
251 mkdir -p web/sync/doxygen
252 doxygen
253 web/sync/doxygen:
254 mkdir -p $@
255 web/sync/doxygen/index.html:
256 web/sync/%.html: web/%.in.html web/header.html web/footer.html web/sync
257 cat web/header.html $< web/footer.html > $@
258 web/sync/%.png: pics/web/%.png web/sync
259 cp $< $@
260 web/sync/%.ico: pics/web/%.ico web/sync
261 cp $< $@
262 web/sync/demo-script: scripts/demo-script web/sync
263 cp $< $@
264 web/sync/para.css: web/para.css web/sync
265 cp $< $@
266 web/sync/versions/paraslash-git.tar.bz2: paraslash-git.tar.bz2 web/sync
267 cp -a versions web/sync && cp $< $@
268 web/sync/overview.pdf: skencil/overview.pdf web/sync
269 cp $< $@
270 web/sync/%: %
271 cp $< $@
272 web/sync/%: pics/screenshots/%
273 cp $< $@
274 skencil/%.ps: skencil/%.sk
275 sk2ps $< > $@
276 %.pdf: %.ps
277 ps2pdf - - < $< > $@