chiark / gitweb /
Get rid of the control master symlink
[innduct.git] / lib / Makefile
1 ##  $Id: Makefile 7727 2008-04-06 07:59:46Z iulius $
2
3 include ../Makefile.global
4
5 top     = ..
6 CFLAGS  = $(GCFLAGS)
7
8 # The base library files that are always compiled and included.
9 SOURCES       = buffer.c cleanfrom.c clientactive.c clientlib.c concat.c \
10                 conffile.c confparse.c daemonize.c date.c dbz.c defdist.c \
11                 fdflags.c fdlimit.c genid.c getfqdn.c getmodaddr.c gettime.c \
12                 hash.c hashtab.c innconf.c inndcomm.c list.c localopen.c \
13                 lockfile.c makedir.c md5.c messages.c mmap.c parsedate.c \
14                 qio.c radix32.c readin.c remopen.c reservedfd.c resource.c \
15                 sendarticle.c sendpass.c sequence.c sockaddr.c timer.c tst.c \
16                 uwildmat.c vector.c version.c wire.c xfopena.c xmalloc.c \
17                 xsignal.c xwrite.c
18
19 # Sources for additional functions only built to replace missing system ones.
20 EXTRA_SOURCES = fseeko.c ftello.c getpagesize.c hstrerror.c inet_aton.c \
21                 inet_ntoa.c memcmp.c mkstemp.c pread.c pwrite.c setenv.c \
22                 setproctitle.c strcasecmp.c strerror.c strlcat.c strlcpy.c \
23                 strspn.c strtok.c
24
25 OBJECTS       = $(LIBOBJS) $(SOURCES:.c=.o)
26 LOBJECTS      = $(OBJECTS:.o=.lo)
27
28 .SUFFIXES: .lo
29
30 all: libinn.$(EXTLIB) perl.o
31
32 warnings:
33         $(MAKE) COPT='$(WARNINGS)' all
34
35 install: all
36         $(LI_XPUB) libinn.$(EXTLIB) $D$(PATHLIB)/libinn.$(EXTLIB)
37
38 clobber clean distclean:
39         rm -f *.o *.lo libinn.la libinn.a parsedate.c parsedate
40         rm -f profiled perl$(PROFSUFFIX).o libinn$(PROFSUFFIX).a
41         rm -f libinn_pure_*.a .pure
42         rm -rf .libs
43
44 tags ctags: $(SOURCES)
45         $(CTAGS) $(SOURCES) ../include/*.h
46
47 libinn.la: $(OBJECTS) $(LOBJECTS)
48         $(LIBLD) $(LDFLAGS) -o $@ $(LOBJECTS) $(LIBS) \
49             -rpath $(PATHLIB) -version-info 2:0:0
50
51 libinn.a: $(OBJECTS)
52         ar r $@ $(OBJECTS)
53         $(RANLIB) libinn.a
54
55 .c.o .c.lo:
56         $(LIBCC) $(CFLAGS) -c $*.c
57
58 perl.o: perl.c
59         $(CC) $(CFLAGS) $(PERLINC) $(LDFLAGS) -c perl.c
60
61 ../include/inn/system.h:
62         (cd ../include && $(MAKE))
63
64 parsedate.c: parsedate.y
65         @echo Expect 6 shift/reduce conflicts
66         $(YACC) parsedate.y
67         @mv y.tab.c parsedate.c
68
69 parsedate: parsedate.c gettime.o
70         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -DTEST -DYYDEBUG parsedate.c gettime.o
71
72 ##  Profiling.  The rules are a bit brute-force, but good enough.
73 profiled: libinn$(PROFSUFFIX).a perl$(PROFSUFFIX).o
74         date >$@
75
76 libinn$(PROFSUFFIX).a perl$(PROFSUFFIX).o: $(OBJECTS) perl.o
77         rm -f $(OBJECTS)
78         $(MAKEPROFILING) libinn.a
79         $(MAKEPROFILING) perl.o
80         mv libinn.a libinn$(PROFSUFFIX).a
81         mv perl.o perl$(PROFSUFFIX).o
82         $(RANLIB) libinn$(PROFSUFFIX).a
83         rm -f $(OBJECTS)
84
85 ##  Dependencies.  Default list, below, is probably good enough.
86
87 depend: Makefile $(SOURCES) $(EXTRA_SOURCES) perl.c ../include/inn/system.h
88         $(MAKEDEPEND) '$(CFLAGS) $(PERLINC)' $(SOURCES) $(EXTRA_SOURCES) perl.c
89
90 # Special dependency to teach make to build the include directory properly.
91 ../include/inn/defines.h: ../include/inn/system.h
92
93 # DO NOT DELETE THIS LINE -- make depend depends on it.
94 buffer.o: buffer.c ../include/config.h ../include/inn/defines.h \
95   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
96   ../include/inn/buffer.h ../include/inn/defines.h ../include/libinn.h
97 cleanfrom.o: cleanfrom.c ../include/config.h ../include/inn/defines.h \
98   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
99   ../include/libinn.h
100 clientactive.o: clientactive.c ../include/config.h \
101   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
102   ../include/config.h ../include/inn/innconf.h ../include/inn/defines.h \
103   ../include/libinn.h ../include/nntp.h ../include/paths.h
104 clientlib.o: clientlib.c ../include/config.h ../include/inn/defines.h \
105   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
106   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
107   ../include/nntp.h
108 concat.o: concat.c ../include/config.h ../include/inn/defines.h \
109   ../include/inn/system.h ../include/libinn.h ../include/config.h
110 conffile.o: conffile.c ../include/config.h ../include/inn/defines.h \
111   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
112   ../include/conffile.h ../include/libinn.h
113 confparse.o: confparse.c ../include/config.h ../include/inn/defines.h \
114   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
115   ../include/inn/confparse.h ../include/inn/defines.h \
116   ../include/inn/hashtab.h ../include/inn/messages.h \
117   ../include/inn/vector.h ../include/libinn.h
118 daemonize.o: daemonize.c ../include/config.h ../include/inn/defines.h \
119   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
120   ../include/inn/messages.h ../include/inn/defines.h ../include/libinn.h
121 date.o: date.c ../include/config.h ../include/inn/defines.h \
122   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
123   ../include/libinn.h
124 dbz.o: dbz.c ../include/config.h ../include/inn/defines.h \
125   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
126   ../include/dbz.h ../include/libinn.h ../include/inn/messages.h \
127   ../include/inn/defines.h ../include/inn/innconf.h ../include/inn/mmap.h \
128   ../include/libinn.h
129 defdist.o: defdist.c ../include/config.h ../include/inn/defines.h \
130   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
131   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
132   ../include/paths.h
133 fdflags.o: fdflags.c ../include/config.h ../include/inn/defines.h \
134   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
135   ../include/libinn.h
136 fdlimit.o: fdlimit.c ../include/config.h ../include/inn/defines.h \
137   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
138   ../include/libinn.h
139 genid.o: genid.c ../include/config.h ../include/inn/defines.h \
140   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
141   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h
142 getfqdn.o: getfqdn.c ../include/config.h ../include/inn/defines.h \
143   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
144   ../include/libinn.h ../include/paths.h
145 getmodaddr.o: getmodaddr.c ../include/config.h ../include/inn/defines.h \
146   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
147   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
148   ../include/nntp.h ../include/paths.h
149 gettime.o: gettime.c ../include/config.h ../include/inn/defines.h \
150   ../include/inn/system.h ../include/libinn.h ../include/config.h
151 hash.o: hash.c ../include/config.h ../include/inn/defines.h \
152   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
153   ../include/inn/md5.h ../include/inn/defines.h ../include/libinn.h
154 hashtab.o: hashtab.c ../include/config.h ../include/inn/defines.h \
155   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
156   ../include/inn/hashtab.h ../include/inn/defines.h ../include/libinn.h
157 innconf.o: innconf.c ../include/config.h ../include/inn/defines.h \
158   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
159   ../include/inn/confparse.h ../include/inn/defines.h \
160   ../include/inn/innconf.h ../include/inn/messages.h \
161   ../include/inn/vector.h ../include/libinn.h ../include/paths.h
162 inndcomm.o: inndcomm.c ../include/config.h ../include/inn/defines.h \
163   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
164   ../include/portable/time.h ../include/config.h \
165   ../include/portable/socket.h ../include/inn/innconf.h \
166   ../include/inn/defines.h ../include/inndcomm.h ../include/libinn.h \
167   ../include/paths.h
168 list.o: list.c ../include/config.h ../include/inn/defines.h \
169   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
170   ../include/inn/list.h ../include/inn/defines.h
171 localopen.o: localopen.c ../include/config.h ../include/inn/defines.h \
172   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
173   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
174   ../include/nntp.h ../include/paths.h
175 lockfile.o: lockfile.c ../include/config.h ../include/inn/defines.h \
176   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
177   ../include/libinn.h
178 makedir.o: makedir.c ../include/config.h ../include/inn/defines.h \
179   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
180   ../include/libinn.h
181 md5.o: md5.c ../include/config.h ../include/inn/defines.h \
182   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
183   ../include/inn/md5.h ../include/inn/defines.h
184 messages.o: messages.c ../include/config.h ../include/inn/defines.h \
185   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
186   ../include/inn/messages.h ../include/inn/defines.h ../include/libinn.h
187 mmap.o: mmap.c ../include/config.h ../include/inn/defines.h \
188   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
189   ../include/portable/mmap.h ../include/config.h \
190   ../include/inn/messages.h ../include/inn/defines.h \
191   ../include/inn/mmap.h
192 parsedate.o: parsedate.c ../include/config.h ../include/inn/defines.h \
193   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
194   ../include/libinn.h
195 qio.o: qio.c ../include/config.h ../include/inn/defines.h \
196   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
197   ../include/inn/qio.h ../include/inn/defines.h ../include/libinn.h
198 radix32.o: radix32.c ../include/config.h ../include/inn/defines.h \
199   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
200   ../include/libinn.h
201 readin.o: readin.c ../include/config.h ../include/inn/defines.h \
202   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
203   ../include/libinn.h
204 remopen.o: remopen.c ../include/config.h ../include/inn/defines.h \
205   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
206   ../include/portable/socket.h ../include/config.h \
207   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
208   ../include/nntp.h ../include/paths.h
209 reservedfd.o: reservedfd.c ../include/config.h ../include/inn/defines.h \
210   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
211   ../include/libinn.h
212 resource.o: resource.c ../include/config.h ../include/inn/defines.h \
213   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
214   ../include/libinn.h
215 sendarticle.o: sendarticle.c ../include/config.h ../include/inn/defines.h \
216   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
217   ../include/libinn.h ../include/nntp.h
218 sendpass.o: sendpass.c ../include/config.h ../include/inn/defines.h \
219   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
220   ../include/inn/innconf.h ../include/inn/defines.h ../include/libinn.h \
221   ../include/nntp.h ../include/paths.h
222 sequence.o: sequence.c ../include/config.h ../include/inn/defines.h \
223   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
224   ../include/inn/sequence.h ../include/inn/defines.h
225 sockaddr.o: sockaddr.c ../include/config.h ../include/inn/defines.h \
226   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
227   ../include/portable/socket.h ../include/config.h ../include/libinn.h
228 timer.o: timer.c ../include/config.h ../include/inn/defines.h \
229   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
230   ../include/portable/time.h ../include/config.h \
231   ../include/inn/messages.h ../include/inn/defines.h \
232   ../include/inn/timer.h ../include/libinn.h
233 tst.o: tst.c ../include/config.h ../include/inn/defines.h \
234   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
235   ../include/inn/tst.h ../include/inn/defines.h ../include/libinn.h
236 uwildmat.o: uwildmat.c ../include/config.h ../include/inn/defines.h \
237   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
238   ../include/libinn.h
239 vector.o: vector.c ../include/config.h ../include/inn/defines.h \
240   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
241   ../include/inn/vector.h ../include/inn/defines.h ../include/libinn.h
242 version.o: version.c ../include/config.h ../include/inn/defines.h \
243   ../include/inn/system.h ../include/inn/version.h
244 wire.o: wire.c ../include/config.h ../include/inn/defines.h \
245   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
246   ../include/inn/wire.h ../include/inn/defines.h ../include/libinn.h
247 xfopena.o: xfopena.c ../include/config.h ../include/inn/defines.h \
248   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
249   ../include/libinn.h
250 xmalloc.o: xmalloc.c ../include/config.h ../include/inn/defines.h \
251   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
252   ../include/inn/messages.h ../include/inn/defines.h ../include/libinn.h
253 xsignal.o: xsignal.c ../include/config.h ../include/inn/defines.h \
254   ../include/inn/system.h ../include/libinn.h ../include/config.h
255 xwrite.o: xwrite.c ../include/config.h ../include/inn/defines.h \
256   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
257   ../include/libinn.h
258 fseeko.o: fseeko.c ../include/config.h ../include/inn/defines.h \
259   ../include/inn/system.h ../include/clibrary.h ../include/config.h
260 ftello.o: ftello.c ../include/config.h ../include/inn/defines.h \
261   ../include/inn/system.h ../include/clibrary.h ../include/config.h
262 getpagesize.o: getpagesize.c ../include/config.h ../include/inn/defines.h \
263   ../include/inn/system.h
264 hstrerror.o: hstrerror.c ../include/config.h ../include/inn/defines.h \
265   ../include/inn/system.h ../include/clibrary.h ../include/config.h
266 inet_aton.o: inet_aton.c ../include/config.h ../include/inn/defines.h \
267   ../include/inn/system.h ../include/clibrary.h ../include/config.h
268 inet_ntoa.o: inet_ntoa.c ../include/config.h ../include/inn/defines.h \
269   ../include/inn/system.h ../include/clibrary.h ../include/config.h
270 memcmp.o: memcmp.c ../include/config.h ../include/inn/defines.h \
271   ../include/inn/system.h
272 mkstemp.o: mkstemp.c ../include/config.h ../include/inn/defines.h \
273   ../include/inn/system.h ../include/clibrary.h ../include/config.h \
274   ../include/portable/time.h ../include/config.h
275 pread.o: pread.c ../include/config.h ../include/inn/defines.h \
276   ../include/inn/system.h ../include/clibrary.h ../include/config.h
277 pwrite.o: pwrite.c ../include/config.h ../include/inn/defines.h \
278   ../include/inn/system.h ../include/clibrary.h ../include/config.h
279 setenv.o: setenv.c ../include/config.h ../include/inn/defines.h \
280   ../include/inn/system.h ../include/clibrary.h ../include/config.h
281 setproctitle.o: setproctitle.c ../include/config.h \
282   ../include/inn/defines.h ../include/inn/system.h ../include/clibrary.h \
283   ../include/config.h ../include/portable/setproctitle.h \
284   ../include/config.h ../include/inn/messages.h ../include/inn/defines.h
285 strcasecmp.o: strcasecmp.c ../include/config.h ../include/inn/defines.h \
286   ../include/inn/system.h ../include/clibrary.h ../include/config.h
287 strerror.o: strerror.c ../include/config.h ../include/inn/defines.h \
288   ../include/inn/system.h
289 strlcat.o: strlcat.c ../include/config.h ../include/inn/defines.h \
290   ../include/inn/system.h ../include/clibrary.h ../include/config.h
291 strlcpy.o: strlcpy.c ../include/config.h ../include/inn/defines.h \
292   ../include/inn/system.h ../include/clibrary.h ../include/config.h
293 strspn.o: strspn.c ../include/config.h ../include/inn/defines.h \
294   ../include/inn/system.h ../include/clibrary.h ../include/config.h
295 strtok.o: strtok.c ../include/config.h ../include/inn/defines.h \
296   ../include/inn/system.h ../include/clibrary.h ../include/config.h
297 perl.o: perl.c ../include/config.h ../include/inn/defines.h \
298   ../include/inn/system.h