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