-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
383 lines (312 loc) · 11.5 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
#
# Makefile.in for Kannel, the Open Source WAP and SMS Gateway.
#
# This file is currently maintained manually. There is currently
# no generation out of automake. This will change as soon as we
# switch to our new autoconf/configure build process.
#
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
datarootdir = @datarootdir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
docdir = @docdir@
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = @CC@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
SHELL = @SHELL@
VERSION = @VERSION@
SUFFIX = @SUFFIX@
LEX = @LEX@
PERL = @PERL@
YACC = @YACC@
# -v gives verbose output.
YFLAGS = -d -p ws_yy_
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = gw-config.h
CONFIG_CLEAN_FILES =
LIBOBJS=@LIBOBJS@
LIBSRCS=$(LIBOBJS:.o=.c)
LIBS=@LIBS@ @LIBICONV@
CFLAGS=-D_REENTRANT=1 -I. -Igw @CFLAGS@
LDFLAGS=@LDFLAGS@
MKDEPEND=$(CC) $(CFLAGS) -MM
JADE=@JADE@
JADETEX=@JADETEX@
PDFJADETEX=@PDFJADETEX@
DVIPS=@DVIPS@
FIG2DEV=@FIG2DEV@
CONVERT=@CONVERT@
HTML_DSL=@HTML_DSL@
TEX_DSL=@TEX_DSL@
XML_DCL=@XML_DCL@
# Set this to something if you want all installed binaries to have a suffix.
# Version number is common.
suffix = $(SUFFIX)
#
# You probably don't need to touch anything below this, if you're just
# compiling and installing the software.
#
STARTSTOPDAEMONSRC=@STARTSTOPDAEMONSRC@
binsrcs = \
wmlscript/wmlsc.c \
wmlscript/wmlsdasm.c \
utils/seewbmp.c \
utils/mtbatch.c \
utils/decode_emimsg.c
sbinsrcs = \
gw/bearerbox.c \
gw/smsbox.c \
gw/wapbox.c \
utils/run_kannel_box.c \
$(STARTSTOPDAEMONSRC)
progsrcs = $(binsrcs) $(sbinsrcs)
progobjs = $(progsrcs:.c=.o)
progs = $(progsrcs:.c=@EXE_EXT@)
binprogs = $(binsrcs:.c=) gw-config
sbinprogs = $(sbinsrcs:.c=)
gwsrcs = $(wildcard gw/*.c) $(wildcard gw/smsc/*.c)
gwobjs = $(filter-out $(progobjs),$(gwsrcs:.c=.o))
libsrcs = $(wildcard gwlib/*.c) $(LIBSRCS)
libobjs = $(libsrcs:.c=.o) $(LIBOBJS)
wapsrcs = $(wildcard wap/*.c) $(wildcard radius/*.c)
wapobjs = $(wapsrcs:.c=.o)
wmlscriptsrcs = $(wildcard wmlscript/*.c)
wmlscriptobjs = $(wmlscriptsrcs:.c=.o)
testsrcs = $(wildcard test/*.c)
testobjs = $(testsrcs:.c=.o)
testprogs = $(testsrcs:.c=@EXE_EXT@)
tests = $(testprogs) $(wildcard test/*.sh)
checksrcs = $(wildcard checks/*.c)
checkobjs = $(checksrcs:.c=.o)
checkprogs = $(checksrcs:.c=@EXE_EXT@)
checks = $(checkprogs) $(wildcard checks/*.sh)
benchformats = \
benchmarks/report.pdf \
benchmarks/report.ps \
benchmarks/report.html
benchscripts = benchmarks/run-benchmarks $(wildcard benchmarks/*.sh)
benchoutputs = \
$(benchformats) \
$(wildcard benchmarks/*.ps) \
$(wildcard benchmarks/*.png) \
$(wildcard benchmarks/*.xml)
srcs = $(wildcard */*.c) $(wildcard */*/*.c)
objs = $(srcs:.c=.o)
pres = $(srcs:.c=.i)
libs = libgw.a libwmlscript.a libwap.a libgwlib.a
srcdirs = gw gw/smsc gwlib test utils wmlscript checks wap radius
man1pages = utils/seewbmp.1 utils/mtbatch.1 wmlscript/wmlsc.1 wmlscript/wmlsdasm.1
man8pages = gw/kannel.8 utils/run_kannel_box.8
docsrcs = $(wildcard grep -l '<!DOCTYPE ' doc/*/*.xml)
docs = $(docsrcs:.xml=.html) $(docsrcs:.xml=.rtf) $(docsrcs:.xml=.ps) $(docsrcs:.xml=.pdf)
DOCSTARGET=@DOCSTARGET@
DOCDRAFTS=@DOCDRAFTS@
pssrcs = $(wildcard doc/alligata/*.png doc/wtls/*.png)
ps = $(pssrcs:.png=.ps)
figsrcs = $(wildcard doc/userguide/*.fig doc/arch/*.fig)
figs = $(figsrcs:.fig=.png) $(figsrcs:.fig=.ps)
.SUFFIXES: $(SUFFIXES) .xml .html .rtf .ps .fig .png .y .c .i .o .pdf
.xml.html:
sed "s/#FIGTYPE#/.png/;s/#VERSION#/${VERSION}/;s/#DATE#/`date +%Y.%m.%d`/;s/#DRAFTS#/${DOCDRAFTS}/" $< > $*.tmp
${JADE} -V nochunks -t sgml -d $(HTML_DSL) $(XML_DCL) $*.tmp > $@
rm -f $*.tmp
.xml.rtf:
sed "s/#FIGTYPE#/.ps/;s/#VERSION#/${VERSION}/;s/#DATE#/`date +%Y.%m.%d`/;s/#DRAFTS#/${DOCDRAFTS}/" $< > $*.tmp
cd `dirname $<` && $(JADE) -o `basename $*`.rtf -t rtf -d $(TEX_DSL) $(XML_DCL) `basename $*`.tmp
rm -f $*.tmp
.xml.ps:
sed "s/#FIGTYPE#/.ps/;s/#VERSION#/${VERSION}/;s/#DATE#/`date +%Y.%m.%d`/;s/#DRAFTS#/${DOCDRAFTS}/" $< > $*.tmp
$(JADE) -o $*.tex -t tex -d $(TEX_DSL) $(XML_DCL) $*.tmp
rm -f $*.tmp
cd `dirname $<` && $(JADETEX) `basename $*`.tex >/dev/null || true
cd `dirname $<` && $(JADETEX) `basename $*`.tex >/dev/null || true
cd `dirname $<` && $(JADETEX) `basename $*`.tex >/dev/null || \
( echo Check `dirname $<`/`basename $*`.log for errors && false)
rm -f $*.log
cd `dirname $<` && $(DVIPS) -q -o `basename $*`.ps `basename $*`.dvi
rm -f $*.dvi $*.tex $*.aux
.xml.pdf:
sed "s/#FIGTYPE#/.png/;s/#VERSION#/${VERSION}/;s/#DATE#/`date +%Y.%m.%d`/;s/#DRAFTS#/${DOCDRAFTS}/" $< > $*.tmp
$(JADE) -o $*.tex -t tex -d $(TEX_DSL) $(XML_DCL) $*.tmp
rm -f $*.tmp
cd `dirname $<` && $(JADETEX) `basename $*`.tex >/dev/null || true
cd `dirname $<` && $(JADETEX) `basename $*`.tex >/dev/null || true
cd `dirname $<` && $(JADETEX) `basename $*`.tex >/dev/null || true
rm -f $*.log $*.dvi
cd `dirname $<` && $(PDFJADETEX) `basename $*`.tex > /dev/null || true
test -r $*.pdf || false
rm -f $*.log $*.tex $*.aux $*.out
.fig.png:
$(FIG2DEV) -Lpng $< $@
.fig.ps:
$(FIG2DEV) -Lps $< $@
.png.ps:
$(CONVERT) $< $@
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.c.o:
$(CC) $(CFLAGS) -o $@ -c $<
.c.i:
$(CC) $(CFLAGS) -o $@ -E $<
all: progs $(testprogs) $(checkprogs) $(DOCSTARGET) gw-config
progs: $(progs)
tests: $(testprogs)
docs: figs ps $(docs)
no-docs:
figs: $(figs)
ps: $(ps)
pp: $(pres)
check: all
utils/run-checks $(checks)
bench: all $(benchformats)
benchmarks/report.xml: dummy
benchmarks/run-benchmarks benchmarks/*.sh
dummy:
install: all
$(INSTALL) -d $(DESTDIR)$(bindir)
for prog in $(binprogs); do \
$(INSTALL) $$prog \
$(DESTDIR)$(bindir)/`basename $$prog`$(suffix); \
done
test -r $(DESTDIR)$(bindir)/gw-config || \
ln -sf gw-config$(suffix) $(DESTDIR)$(bindir)/gw-config
$(INSTALL) -d $(DESTDIR)$(sbindir)
for prog in $(sbinprogs); do \
$(INSTALL) $$prog \
$(DESTDIR)$(sbindir)/`basename $$prog`$(suffix); \
done
$(INSTALL) -d $(DESTDIR)$(mandir)/man1
$(INSTALL) $(man1pages) $(DESTDIR)$(mandir)/man1
$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(INSTALL) $(man8pages) $(DESTDIR)$(mandir)/man8
$(INSTALL) -d $(DESTDIR)$(includedir)/kannel/gwlib
$(INSTALL_DATA) $(top_srcdir)/gwlib/*.h $(DESTDIR)$(includedir)/kannel/gwlib
$(INSTALL_DATA) $(top_srcdir)/gwlib/*.def $(DESTDIR)$(includedir)/kannel/gwlib
$(INSTALL) -d $(DESTDIR)$(includedir)/kannel/gw
$(INSTALL_DATA) $(top_srcdir)/gw/*.h $(DESTDIR)$(includedir)/kannel/gw
$(INSTALL_DATA) $(top_srcdir)/gw/*.def $(DESTDIR)$(includedir)/kannel/gw
$(INSTALL) -d $(DESTDIR)$(includedir)/kannel/gw/smsc
$(INSTALL_DATA) $(top_srcdir)/gw/smsc/*.h $(DESTDIR)$(includedir)/kannel/gw/smsc
$(INSTALL_DATA) $(top_srcdir)/gw/smsc/*.def $(DESTDIR)$(includedir)/kannel/gw/smsc
$(INSTALL) -d $(DESTDIR)$(includedir)/kannel/wap
$(INSTALL_DATA) $(top_srcdir)/wap/*.h $(DESTDIR)$(includedir)/kannel/wap
$(INSTALL_DATA) $(top_srcdir)/wap/*.def $(DESTDIR)$(includedir)/kannel/wap
$(INSTALL_DATA) gw-config.h $(DESTDIR)$(includedir)/kannel
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel
$(INSTALL_DATA) lib*.a $(DESTDIR)$(libdir)/kannel
install-test: all
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel/test
(cd test && find . -type f ! -name "*.c" ! -name "*.o" | grep -v ".cvsignore" | grep -v "/CVS/" | while read a ; do $(INSTALL_DATA) $$a $(DESTDIR)$(libdir)/kannel/test ; done)
for prog in $(tests) ; do \
chmod 755 $(DESTDIR)$(libdir)/kannel/$$prog ; \
done
install-checks: all
$(INSTALL) -d $(DESTDIR)$(libdir)/kannel/checks
(cd checks && find . -type f ! -name "*.c" ! -name "*.o" | grep -v ".cvsignore" | grep -v "/CVS/" | while read a ; do $(INSTALL_DATA) $$a $(DESTDIR)$(libdir)/kannel/checks ; done)
for prog in $(checks) ; do \
chmod 755 $(DESTDIR)$(libdir)/kannel/$$prog ; \
done
install-contrib: all
$(INSTALL) -d $(DESTDIR)$(docdir)/contrib
(cd contrib && find . -type d ! -name "CVS" | while read a ; do $(INSTALL) -d $(DESTDIR)$(docdir)/contrib/$$a ; done )
(cd contrib && find . -type f ! -name ".cvsignore" | grep -v "/CVS/" | while read a ; do $(INSTALL_DATA) $$a $(DESTDIR)$(docdir)/contrib/$$a ; done )
find $(DESTDIR)$(docdir)/contrib/ -name "*.pl" -o -name "*.sh" -o -name "*.cgi" -o -name "sendsms" -o -name "kannel.monitor" | while read a ; do chmod 755 "$$a" ; done
install-docs:
$(INSTALL) -d $(DESTDIR)$(docdir)/examples
$(INSTALL_DATA) doc/examples/*.conf $(DESTDIR)$(docdir)/examples
for docfile in userguide alligata wtls ; do \
$(INSTALL) -d $(DESTDIR)$(docdir)/$$docfile ; \
$(INSTALL_DATA) doc/$$docfile/$$docfile.ps $(DESTDIR)$(docdir)/$$docfile ; \
$(INSTALL_DATA) doc/$$docfile/$$docfile.html $(DESTDIR)$(docdir)/$$docfile ; \
$(INSTALL_DATA) doc/$$docfile/$$docfile.rtf $(DESTDIR)$(docdir)/$$docfile ; \
$(INSTALL_DATA) doc/$$docfile/$$docfile.pdf $(DESTDIR)$(docdir)/$$docfile ; \
$(INSTALL_DATA) doc/$$docfile/*.png $(DESTDIR)$(docdir)/$$docfile ; \
done
clean:
find . -name "*.o" -o -name "*.i" -o -name "*.a" | xargs rm -f
rm -f core gw-config $(progs) $(testprogs) $(checkprogs)
rm -f $(figs) $(ps) $(docs)
rm -f $(benchoutputs)
distclean: clean
rm -f Makefile gw-config.h config.cache config.log config.status config.nice .depend gwlib/gw_uuid_types.h
nag:
utils/find-long-lines
@SOAP_INCLUDE@
depend .depend: wmlscript/wsgram.h gw-config.h $(soap_depend)
for dir in $(srcdirs); do \
for file in $$dir/*.c; do \
$(MKDEPEND) $$file -MT $$dir/`basename $$file .c`.o -MT $$dir/`basename $$file .c`.i; done; done > .depend
include .depend
libgw.a: $(gwobjs)
@LIBTOOL@ libgw.a $(gwobjs)
$(RANLIB) libgw.a
libgwlib.a: $(libobjs)
@LIBTOOL@ libgwlib.a $(libobjs)
$(RANLIB) libgwlib.a
libwmlscript.a: $(wmlscriptobjs)
@LIBTOOL@ libwmlscript.a $(wmlscriptobjs)
$(RANLIB) libwmlscript.a
libwap.a: $(wapobjs)
@LIBTOOL@ libwap.a $(wapobjs)
$(RANLIB) libwap.a
wmlscript/wsgram.h: wmlscript/wsgram.c
make-op-table: $(srcdir)/wmlscript/make-op-table.in
sed 's%@PERLPROG@%@PERL@%g' $(srcdir)/wmlscript/make-op-table.in \
> make-op-table
chmod a+x make-op-table
opcodes:
./make-op-table $(srcdir)/wmlscript/wsasm.h \
> $(srcdir)/wmlscript/wsopcodes.h
$(progs): $(libs) $(progobjs)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(@:@EXE_EXT@=).o $(libs) $(LIBS)
$(testprogs): $(testobjs) $(libs)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(@:@EXE_EXT@=).o $(libs) $(LIBS)
$(checkprogs): $(checkobjs) $(libs)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(@:@EXE_EXT@=).o $(libs) $(LIBS)
pkg: all
(cd solaris; mk-solaris-package.sh)
echo Package is now in solaris directory
gw-config: utils/foobar-config.sh Makefile
./utils/foobar-config.sh "-I$(includedir)/kannel @CFLAGS@" \
"-L$(libdir)/kannel -lgw -lwap -lgwlib $(LIBS)" \
"@VERSION@" > gw-config
chmod 0755 gw-config