File: Makefile

package info (click to toggle)
twoftpd 1.14-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,556 kB
  • ctags: 901
  • sloc: ansic: 6,685; makefile: 321; sh: 175
file content (566 lines) | stat: -rw-r--r-- 20,298 bytes parent folder | download
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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# Don't edit Makefile!  Use conf-* for configuration.
#
# Generated by spac see http://untroubled.org/spac/

SHELL=/bin/sh

DEFAULT: all

all: programs installer instcheck instshow

backend.a: makelib backend.o iopoll.o list.o messagefile.o path.o retr.o socket.o stat.o state.o store.o
	./makelib backend.a backend.o iopoll.o list.o messagefile.o path.o retr.o socket.o stat.o state.o store.o

backend.o: compile backend.c systime.h twoftpd.h backend.h iobuf/iobuf.h str/str.h
	./compile backend.c

banner.o: compile banner.c twoftpd.h
	./compile banner.c

choose: warn-auto.sh choose.sh
	cat warn-auto.sh choose.sh >choose
	chmod 755 choose

compile: conf-cc
	( echo '#!/bin/sh'; \
	  echo 'source=$$1; shift'; \
	  echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
	  echo exec `head -1 conf-cc` '-I. -o $${base}.o -c $$source $${1+"$$@"}'; \
	) >compile
	chmod 755 compile

conf.o: compile conf.c conf.h iobuf/iobuf.h iobuf/iobuf.h err/err.h
	./compile conf.c

conf_bin.c: conf-bin
	head -1 conf-bin | \
	  sed -e 's/"/\\"/g' \
	      -e 's/^/const char conf_bin[] = "/' \
	      -e 's/$$/";/' >conf_bin.c

conf_man.c: conf-man
	head -1 conf-man | \
	  sed -e 's/"/\\"/g' \
	      -e 's/^/const char conf_man[] = "/' \
	      -e 's/$$/";/' >conf_man.c

cvm/client.a: makelib cvm/client.o cvm/client_domain.o cvm/client_setugid.o cvm/client_setenv.o cvm/facts.o
	./makelib cvm/client.a cvm/client.o cvm/client_domain.o cvm/client_setugid.o cvm/client_setenv.o cvm/facts.o

cvm/client.o: compile cvm/client.c socket/socket.h fork.h cvm/client.h cvm/facts.h cvm/errors.h iopoll.h
	./compile cvm/client.c

cvm/client_domain.o: compile cvm/client_domain.c cvm/client.h cvm/facts.h cvm/errors.h
	./compile cvm/client_domain.c

cvm/client_setenv.o: compile cvm/client_setenv.c cvm/client.h cvm/facts.h cvm/errors.h setenv.h
	./compile cvm/client_setenv.c

cvm/client_setugid.o: compile cvm/client_setugid.c cvm/client.h cvm/facts.h cvm/errors.h
	./compile cvm/client_setugid.c

cvm/facts.o: compile cvm/facts.c cvm/facts.h
	./compile cvm/facts.c

direntry.h: compile direntry.h1 direntry.h2 trydirent.c
	( ./compile trydirent.c >/dev/null 2>&1 \
	  && cat direntry.h2 || cat direntry.h1 ) > direntry.h
	rm -f trydirent.o

err/die.o: compile err/die.c err/err.h
	./compile err/die.c

err/err.a: makelib err/die.o err/error.o err/message.o err/warn.o
	./makelib err/err.a err/die.o err/error.o err/message.o err/warn.o

err/error.o: compile err/error.c err/err.h
	./compile err/error.c

err/message.o: compile err/message.c iobuf/iobuf.h err/err.h
	./compile err/message.c

err/warn.o: compile err/warn.c err/err.h
	./compile err/warn.c

fork.h: compile load fork.h1 fork.h2 tryvfork.c
	( ( ./compile tryvfork.c && ./load tryvfork ) >/dev/null 2>&1 \
	  && cat fork.h2 || cat fork.h1 ) > fork.h
	rm -f tryvfork.o tryvfork

installer: load installer.o insthier.o
	./load installer insthier.o

installer.o: compile installer.c installer.h
	./compile installer.c

instcheck: load instcheck.o insthier.o
	./load instcheck insthier.o

instcheck.o: compile instcheck.c installer.h
	./compile instcheck.c

insthier.o: compile insthier.c conf_bin.c conf_man.c installer.h
	./compile insthier.c

instshow: load instshow.o insthier.o
	./load instshow insthier.o

instshow.o: compile instshow.c installer.h
	./compile instshow.c

iobuf/ibuf_getc.o: compile iobuf/ibuf_getc.c iobuf/iobuf.h
	./compile iobuf/ibuf_getc.c

iobuf/ibuf_gets.o: compile iobuf/ibuf_gets.c iobuf/iobuf.h
	./compile iobuf/ibuf_gets.c

iobuf/ibuf_getu.o: compile iobuf/ibuf_getu.c iobuf/iobuf.h
	./compile iobuf/ibuf_getu.c

iobuf/ibuf_init.o: compile iobuf/ibuf_init.c iobuf/iobuf.h
	./compile iobuf/ibuf_init.c

iobuf/ibuf_open.o: compile iobuf/ibuf_open.c iobuf/iobuf.h
	./compile iobuf/ibuf_open.c

iobuf/ibuf_peek.o: compile iobuf/ibuf_peek.c iobuf/iobuf.h
	./compile iobuf/ibuf_peek.c

iobuf/ibuf_read.o: compile iobuf/ibuf_read.c iobuf/iobuf.h
	./compile iobuf/ibuf_read.c

iobuf/ibuf_refill.o: compile iobuf/ibuf_refill.c iobuf/iobuf.h
	./compile iobuf/ibuf_refill.c

iobuf/ibuf_seek.o: compile iobuf/ibuf_seek.c iobuf/iobuf.h
	./compile iobuf/ibuf_seek.c

iobuf/ibuf_status.o: compile iobuf/ibuf_status.c iobuf/iobuf.h
	./compile iobuf/ibuf_status.c

iobuf/ibuf_stdin.o: compile iobuf/ibuf_stdin.c iobuf/iobuf.h
	./compile iobuf/ibuf_stdin.c

iobuf/ibuf_tell.o: compile iobuf/ibuf_tell.c iobuf/iobuf.h
	./compile iobuf/ibuf_tell.c

iobuf/iobuf.a: makelib iobuf/iobuf_close.o iobuf/iobuf_copy.o iobuf/iobuf_init.o iobuf/iobuf_timeout.o iobuf/ibuf_getc.o iobuf/ibuf_gets.o iobuf/ibuf_getu.o iobuf/ibuf_init.o iobuf/ibuf_open.o iobuf/ibuf_peek.o iobuf/ibuf_read.o iobuf/ibuf_refill.o iobuf/ibuf_seek.o iobuf/ibuf_status.o iobuf/ibuf_stdin.o iobuf/ibuf_tell.o iobuf/obuf_close.o iobuf/obuf_endl.o iobuf/obuf_flush.o iobuf/obuf_init.o iobuf/obuf_open.o iobuf/obuf_pad.o iobuf/obuf_put2s.o iobuf/obuf_put3s.o iobuf/obuf_put4s.o iobuf/obuf_put5s.o iobuf/obuf_put6s.o iobuf/obuf_put7s.o iobuf/obuf_putc.o iobuf/obuf_putiw.o iobuf/obuf_putnetstring.o iobuf/obuf_putsflush.o iobuf/obuf_putuw.o iobuf/obuf_seek.o iobuf/obuf_stderr.o iobuf/obuf_stdout.o iobuf/obuf_sync.o iobuf/obuf_write.o
	./makelib iobuf/iobuf.a iobuf/iobuf_close.o iobuf/iobuf_copy.o iobuf/iobuf_init.o iobuf/iobuf_timeout.o iobuf/ibuf_getc.o iobuf/ibuf_gets.o iobuf/ibuf_getu.o iobuf/ibuf_init.o iobuf/ibuf_open.o iobuf/ibuf_peek.o iobuf/ibuf_read.o iobuf/ibuf_refill.o iobuf/ibuf_seek.o iobuf/ibuf_status.o iobuf/ibuf_stdin.o iobuf/ibuf_tell.o iobuf/obuf_close.o iobuf/obuf_endl.o iobuf/obuf_flush.o iobuf/obuf_init.o iobuf/obuf_open.o iobuf/obuf_pad.o iobuf/obuf_put2s.o iobuf/obuf_put3s.o iobuf/obuf_put4s.o iobuf/obuf_put5s.o iobuf/obuf_put6s.o iobuf/obuf_put7s.o iobuf/obuf_putc.o iobuf/obuf_putiw.o iobuf/obuf_putnetstring.o iobuf/obuf_putsflush.o iobuf/obuf_putuw.o iobuf/obuf_seek.o iobuf/obuf_stderr.o iobuf/obuf_stdout.o iobuf/obuf_sync.o iobuf/obuf_write.o

iobuf/iobuf_close.o: compile iobuf/iobuf_close.c iobuf/iobuf.h
	./compile iobuf/iobuf_close.c

iobuf/iobuf_copy.o: compile iobuf/iobuf_copy.c iobuf/iobuf.h
	./compile iobuf/iobuf_copy.c

iobuf/iobuf_init.o: compile iobuf/iobuf_init.c iobuf/iobuf.h
	./compile iobuf/iobuf_init.c

iobuf/iobuf_timeout.o: compile iobuf/iobuf_timeout.c iobuf/iobuf.h iopoll.h
	./compile iobuf/iobuf_timeout.c

iobuf/obuf_close.o: compile iobuf/obuf_close.c iobuf/iobuf.h
	./compile iobuf/obuf_close.c

iobuf/obuf_endl.o: compile iobuf/obuf_endl.c iobuf/iobuf.h
	./compile iobuf/obuf_endl.c

iobuf/obuf_flush.o: compile iobuf/obuf_flush.c iobuf/iobuf.h
	./compile iobuf/obuf_flush.c

iobuf/obuf_init.o: compile iobuf/obuf_init.c iobuf/iobuf.h
	./compile iobuf/obuf_init.c

iobuf/obuf_open.o: compile iobuf/obuf_open.c iobuf/iobuf.h
	./compile iobuf/obuf_open.c

iobuf/obuf_pad.o: compile iobuf/obuf_pad.c iobuf/iobuf.h
	./compile iobuf/obuf_pad.c

iobuf/obuf_put2s.o: compile iobuf/obuf_put2s.c iobuf/iobuf.h
	./compile iobuf/obuf_put2s.c

iobuf/obuf_put3s.o: compile iobuf/obuf_put3s.c iobuf/iobuf.h
	./compile iobuf/obuf_put3s.c

iobuf/obuf_put4s.o: compile iobuf/obuf_put4s.c iobuf/iobuf.h
	./compile iobuf/obuf_put4s.c

iobuf/obuf_put5s.o: compile iobuf/obuf_put5s.c iobuf/iobuf.h
	./compile iobuf/obuf_put5s.c

iobuf/obuf_put6s.o: compile iobuf/obuf_put6s.c iobuf/iobuf.h
	./compile iobuf/obuf_put6s.c

iobuf/obuf_put7s.o: compile iobuf/obuf_put7s.c iobuf/iobuf.h
	./compile iobuf/obuf_put7s.c

iobuf/obuf_putc.o: compile iobuf/obuf_putc.c iobuf/iobuf.h
	./compile iobuf/obuf_putc.c

iobuf/obuf_putiw.o: compile iobuf/obuf_putiw.c iobuf/iobuf.h
	./compile iobuf/obuf_putiw.c

iobuf/obuf_putnetstring.o: compile iobuf/obuf_putnetstring.c iobuf/iobuf.h
	./compile iobuf/obuf_putnetstring.c

iobuf/obuf_putsflush.o: compile iobuf/obuf_putsflush.c iobuf/iobuf.h
	./compile iobuf/obuf_putsflush.c

iobuf/obuf_putuw.o: compile iobuf/obuf_putuw.c iobuf/iobuf.h
	./compile iobuf/obuf_putuw.c

iobuf/obuf_seek.o: compile iobuf/obuf_seek.c iobuf/iobuf.h
	./compile iobuf/obuf_seek.c

iobuf/obuf_stderr.o: compile iobuf/obuf_stderr.c iobuf/iobuf.h
	./compile iobuf/obuf_stderr.c

iobuf/obuf_stdout.o: compile iobuf/obuf_stdout.c iobuf/iobuf.h
	./compile iobuf/obuf_stdout.c

iobuf/obuf_sync.o: compile iobuf/obuf_sync.c iobuf/iobuf.h
	./compile iobuf/obuf_sync.c

iobuf/obuf_write.o: compile iobuf/obuf_write.c iobuf/iobuf.h
	./compile iobuf/obuf_write.c

iopoll.h: choose compile load trypoll.c iopoll.h1 iopoll.h2 iopoll.c
	./choose clr trypoll iopoll.h1 iopoll.h2 > iopoll.h

iopoll.o: compile iopoll.c iopoll.h select.h
	./compile iopoll.c

list.o: compile list.c systime.h direntry.h twoftpd.h backend.h iobuf/iobuf.h str/str.h str/str.h path/path.h str/str.h
	./compile list.c

load: conf-ld
	( echo '#!/bin/sh';\
	  echo 'main="$$1"; shift';\
	  echo exec `head -1 conf-ld` '-o "$$main" "$$main.o" $${1+"$$@"}';\
	) >load
	chmod 755 load

log.o: compile log.c iobuf/iobuf.h log.h
	./compile log.c

main.a: makelib banner.o log.o main.o respond.o responses.o strtou.o
	./makelib main.a banner.o log.o main.o respond.o responses.o strtou.o

main.o: compile main.c iobuf/iobuf.h twoftpd.h log.h
	./compile main.c

makelib: 
	( echo '#!/bin/sh'; \
	  echo 'main="$$1"; shift';\
	  echo 'rm -f "$$main"';\
	  echo 'ar cr "$$main" $${1+"$$@"}';\
	  echo 'ranlib "$$main"';\
	) >makelib
	chmod 755 makelib

messagefile.o: compile messagefile.c systime.h twoftpd.h backend.h iobuf/iobuf.h str/str.h
	./compile messagefile.c

path.o: compile path.c twoftpd.h backend.h iobuf/iobuf.h str/str.h path/path.h str/str.h
	./compile path.c

path/contains.o: compile path/contains.c path/path.h str/str.h
	./compile path/contains.c

path/fnmatch.o: compile path/fnmatch.c path/path.h str/str.h
	./compile path/fnmatch.c

path/match.o: compile path/match.c direntry.h str/str.h str/iter.h str/str.h path/path.h str/str.h
	./compile path/match.c

path/merge.o: compile path/merge.c path/path.h str/str.h
	./compile path/merge.c

path/path.a: makelib path/contains.o path/fnmatch.o path/match.o path/merge.o
	./makelib path/path.a path/contains.o path/fnmatch.o path/match.o path/merge.o

programs: twoftpd-anon twoftpd-auth twoftpd-xfer twoftpd-conf twoftpd-anon-conf

respond.o: compile respond.c iobuf/iobuf.h twoftpd.h log.h
	./compile respond.c

responses.o: compile responses.c twoftpd.h
	./compile responses.c

retr.o: compile retr.c twoftpd.h backend.h iobuf/iobuf.h str/str.h
	./compile retr.c

select.h: choose compile trysysel.c select.h1 select.h2
	./choose c trysysel select.h1 select.h2 > select.h

setenv.h: choose compile load setenv.h1 setenv.h2 trysetenv.c
	./choose cl trysetenv setenv.h1 setenv.h2 > setenv.h

setenv.o: compile setenv.c setenv.h
	./compile setenv.c

socket.lib: compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -lsocket -lnsl ) >/dev/null 2>&1 \
	  && echo -lsocket -lnsl || exit 0 ) >socket.lib
	rm -f trylib.o trylib

socket.o: compile socket.c socket/socket.h iopoll.h twoftpd.h backend.h iobuf/iobuf.h str/str.h unix/nonblock.h
	./compile socket.c

socket/accept4.o: compile socket/accept4.c socket/socket.h
	./compile socket/accept4.c

socket/acceptu.o: compile socket/acceptu.c socket/socket.h
	./compile socket/acceptu.c

socket/bind4.o: compile socket/bind4.c socket/socket.h
	./compile socket/bind4.c

socket/bindu.o: compile socket/bindu.c socket/socket.h
	./compile socket/bindu.c

socket/broadcast.o: compile socket/broadcast.c socket/socket.h
	./compile socket/broadcast.c

socket/connect4.o: compile socket/connect4.c socket/socket.h
	./compile socket/connect4.c

socket/connected.o: compile socket/connected.c socket/socket.h
	./compile socket/connected.c

socket/connectu.o: compile socket/connectu.c socket/socket.h
	./compile socket/connectu.c

socket/cork.o: compile socket/cork.c socket/socket.h
	./compile socket/cork.c

socket/getaddr4.o: compile socket/getaddr4.c socket/socket.h
	./compile socket/getaddr4.c

socket/ipv4addr.o: compile socket/ipv4addr.c socket/socket.h
	./compile socket/ipv4addr.c

socket/linger.o: compile socket/linger.c socket/socket.h
	./compile socket/linger.c

socket/listen.o: compile socket/listen.c socket/socket.h
	./compile socket/listen.c

socket/recv4.o: compile socket/recv4.c socket/socket.h
	./compile socket/recv4.c

socket/recvu.o: compile socket/recvu.c socket/socket.h
	./compile socket/recvu.c

socket/reuse.o: compile socket/reuse.c socket/socket.h
	./compile socket/reuse.c

socket/send4.o: compile socket/send4.c socket/socket.h
	./compile socket/send4.c

socket/sendu.o: compile socket/sendu.c socket/socket.h
	./compile socket/sendu.c

socket/shutdown.o: compile socket/shutdown.c socket/socket.h
	./compile socket/shutdown.c

socket/socket.a: makelib socket/accept4.o socket/acceptu.o socket/bind4.o socket/bindu.o socket/broadcast.o socket/connect4.o socket/connected.o socket/connectu.o socket/cork.o socket/getaddr4.o socket/ipv4addr.o socket/linger.o socket/listen.o socket/recv4.o socket/recvu.o socket/reuse.o socket/send4.o socket/sendu.o socket/shutdown.o socket/tcp.o socket/udp.o socket/uncork.o socket/unixdgm.o socket/unixstr.o
	./makelib socket/socket.a socket/accept4.o socket/acceptu.o socket/bind4.o socket/bindu.o socket/broadcast.o socket/connect4.o socket/connected.o socket/connectu.o socket/cork.o socket/getaddr4.o socket/ipv4addr.o socket/linger.o socket/listen.o socket/recv4.o socket/recvu.o socket/reuse.o socket/send4.o socket/sendu.o socket/shutdown.o socket/tcp.o socket/udp.o socket/uncork.o socket/unixdgm.o socket/unixstr.o

socket/tcp.o: compile socket/tcp.c socket/socket.h
	./compile socket/tcp.c

socket/udp.o: compile socket/udp.c socket/socket.h
	./compile socket/udp.c

socket/uncork.o: compile socket/uncork.c socket/socket.h
	./compile socket/uncork.c

socket/unixdgm.o: compile socket/unixdgm.c socket/socket.h
	./compile socket/unixdgm.c

socket/unixstr.o: compile socket/unixstr.c socket/socket.h
	./compile socket/unixstr.c

stat.o: compile stat.c systime.h twoftpd.h backend.h iobuf/iobuf.h str/str.h
	./compile stat.c

state.o: compile state.c twoftpd.h backend.h iobuf/iobuf.h str/str.h path/path.h str/str.h
	./compile state.c

store.o: compile store.c twoftpd.h backend.h iobuf/iobuf.h str/str.h
	./compile store.c

str/buildmap.o: compile str/buildmap.c str/str.h
	./compile str/buildmap.c

str/cat.o: compile str/cat.c str/str.h
	./compile str/cat.c

str/cat2s.o: compile str/cat2s.c str/str.h
	./compile str/cat2s.c

str/cat3s.o: compile str/cat3s.c str/str.h
	./compile str/cat3s.c

str/cat4s.o: compile str/cat4s.c str/str.h
	./compile str/cat4s.c

str/cat5s.o: compile str/cat5s.c str/str.h
	./compile str/cat5s.c

str/cat6s.o: compile str/cat6s.c str/str.h
	./compile str/cat6s.c

str/catiw.o: compile str/catiw.c str/str.h
	./compile str/catiw.c

str/catuw.o: compile str/catuw.c str/str.h
	./compile str/catuw.c

str/cmp.o: compile str/cmp.c str/str.h
	./compile str/cmp.c

str/copy.o: compile str/copy.c str/str.h
	./compile str/copy.c

str/copy2s.o: compile str/copy2s.c str/str.h
	./compile str/copy2s.c

str/copy3s.o: compile str/copy3s.c str/str.h
	./compile str/copy3s.c

str/copy4s.o: compile str/copy4s.c str/str.h
	./compile str/copy4s.c

str/copy5s.o: compile str/copy5s.c str/str.h
	./compile str/copy5s.c

str/copy6s.o: compile str/copy6s.c str/str.h
	./compile str/copy6s.c

str/count.o: compile str/count.c str/str.h
	./compile str/count.c

str/countof.o: compile str/countof.c str/str.h
	./compile str/countof.c

str/cut.o: compile str/cut.c str/str.h
	./compile str/cut.c

str/diff.o: compile str/diff.c str/str.h
	./compile str/diff.c

str/findnext.o: compile str/findnext.c str/str.h
	./compile str/findnext.c

str/findnextof.o: compile str/findnextof.c str/str.h
	./compile str/findnextof.c

str/findprev.o: compile str/findprev.c str/str.h
	./compile str/findprev.c

str/findprevof.o: compile str/findprevof.c str/str.h
	./compile str/findprevof.c

str/free.o: compile str/free.c str/str.h
	./compile str/free.c

str/init.o: compile str/init.c str/str.h
	./compile str/init.c

str/iter.a: makelib str/iter_advance.o str/iter_start.o str/iter_valid.o
	./makelib str/iter.a str/iter_advance.o str/iter_start.o str/iter_valid.o

str/iter_advance.o: compile str/iter_advance.c str/iter.h str/str.h
	./compile str/iter_advance.c

str/iter_start.o: compile str/iter_start.c str/iter.h str/str.h
	./compile str/iter_start.c

str/iter_valid.o: compile str/iter_valid.c str/iter.h str/str.h
	./compile str/iter_valid.c

str/join.o: compile str/join.c str/str.h
	./compile str/join.c

str/lower.o: compile str/lower.c str/str.h
	./compile str/lower.c

str/lstrip.o: compile str/lstrip.c str/str.h
	./compile str/lstrip.c

str/ready.o: compile str/ready.c str/str.h
	./compile str/ready.c

str/realloc.o: compile str/realloc.c str/str.h
	./compile str/realloc.c

str/rstrip.o: compile str/rstrip.c str/str.h
	./compile str/rstrip.c

str/sort.o: compile str/sort.c str/str.h
	./compile str/sort.c

str/str.a: makelib str/buildmap.o str/cat.o str/cat2s.o str/cat3s.o str/cat4s.o str/cat5s.o str/cat6s.o str/catiw.o str/catuw.o str/cmp.o str/copy.o str/copy2s.o str/copy3s.o str/copy4s.o str/copy5s.o str/copy6s.o str/count.o str/countof.o str/cut.o str/diff.o str/findnext.o str/findnextof.o str/findprev.o str/findprevof.o str/free.o str/init.o str/join.o str/lower.o str/lstrip.o str/ready.o str/realloc.o str/rstrip.o str/sort.o str/subst.o str/truncate.o str/upper.o
	./makelib str/str.a str/buildmap.o str/cat.o str/cat2s.o str/cat3s.o str/cat4s.o str/cat5s.o str/cat6s.o str/catiw.o str/catuw.o str/cmp.o str/copy.o str/copy2s.o str/copy3s.o str/copy4s.o str/copy5s.o str/copy6s.o str/count.o str/countof.o str/cut.o str/diff.o str/findnext.o str/findnextof.o str/findprev.o str/findprevof.o str/free.o str/init.o str/join.o str/lower.o str/lstrip.o str/ready.o str/realloc.o str/rstrip.o str/sort.o str/subst.o str/truncate.o str/upper.o

str/subst.o: compile str/subst.c str/str.h
	./compile str/subst.c

str/truncate.o: compile str/truncate.c str/str.h
	./compile str/truncate.c

str/upper.o: compile str/upper.c str/str.h
	./compile str/upper.c

strtou.o: compile strtou.c twoftpd.h
	./compile strtou.c

systime.h: compile trysystime.c trytime.c
	( ( ./compile trysystime.c >/dev/null 2>&1 && \
	    echo '#include <sys/time.h>' ); \
	  ( ./compile trytime.c >/dev/null 2>&1 && \
	    echo '#include <time.h>' ) ) >systime.h
	rm -f trysystime.o trytime.o

twoftpd-anon: load twoftpd-anon.o backend.a main.a path/path.a iobuf/iobuf.a socket/socket.a unix/nonblock.a socket.lib str/iter.a str/str.a
	./load twoftpd-anon backend.a main.a path/path.a iobuf/iobuf.a socket/socket.a unix/nonblock.a `cat socket.lib` str/iter.a str/str.a 

twoftpd-anon-conf: load twoftpd-anon-conf.o conf.o err/err.a iobuf/iobuf.a iopoll.o
	./load twoftpd-anon-conf conf.o err/err.a iobuf/iobuf.a iopoll.o 

twoftpd-anon-conf.o: compile twoftpd-anon-conf.c conf.h iobuf/iobuf.h conf_bin.c iobuf/iobuf.h err/err.h
	./compile twoftpd-anon-conf.c

twoftpd-anon.o: compile twoftpd-anon.c twoftpd.h backend.h iobuf/iobuf.h str/str.h
	./compile twoftpd-anon.c

twoftpd-auth: load twoftpd-auth.o main.a cvm/client.a iobuf/iobuf.a socket/socket.a iopoll.o setenv.o socket.lib
	./load twoftpd-auth main.a cvm/client.a iobuf/iobuf.a socket/socket.a iopoll.o setenv.o `cat socket.lib` 

twoftpd-auth.o: compile twoftpd-auth.c twoftpd.h cvm/client.h cvm/facts.h cvm/errors.h setenv.h
	./compile twoftpd-auth.c

twoftpd-conf: load twoftpd-conf.o conf.o err/err.a iobuf/iobuf.a iopoll.o
	./load twoftpd-conf conf.o err/err.a iobuf/iobuf.a iopoll.o 

twoftpd-conf.o: compile twoftpd-conf.c conf.h iobuf/iobuf.h conf_bin.c iobuf/iobuf.h err/err.h
	./compile twoftpd-conf.c

twoftpd-xfer: load twoftpd-xfer.o backend.a main.a path/path.a iobuf/iobuf.a socket/socket.a unix/nonblock.a str/iter.a str/str.a socket.lib
	./load twoftpd-xfer backend.a main.a path/path.a iobuf/iobuf.a socket/socket.a unix/nonblock.a str/iter.a str/str.a `cat socket.lib` 

twoftpd-xfer.o: compile twoftpd-xfer.c twoftpd.h backend.h iobuf/iobuf.h str/str.h
	./compile twoftpd-xfer.c

unix/nonblock.a: makelib unix/nonblock_off.o unix/nonblock_on.o
	./makelib unix/nonblock.a unix/nonblock_off.o unix/nonblock_on.o

unix/nonblock_off.o: compile unix/nonblock_off.c unix/nonblock.h
	./compile unix/nonblock_off.c

unix/nonblock_on.o: compile unix/nonblock_on.c unix/nonblock.h
	./compile unix/nonblock_on.c