summaryrefslogtreecommitdiff
path: root/Makefile
blob: 41a9c98f5dc81425d1eb3cd4ad25e5cc464ca974 (plain)
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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
# Don't edit Makefile! Use conf-* for configuration.

SHELL=/bin/sh

default: it

addcr: \
load addcr.o substdio.a error.a str.a
	./load addcr substdio.a error.a str.a 

addcr.0: \
addcr.1
	nroff -man addcr.1 > addcr.0

addcr.o: \
compile addcr.c substdio.h subfd.h substdio.h exit.h
	./compile addcr.c

alloc.0: \
alloc.3
	nroff -man alloc.3 > alloc.0

alloc.a: \
makelib alloc.o alloc_re.o
	./makelib alloc.a alloc.o alloc_re.o

alloc.o: \
compile alloc.c alloc.h error.h
	./compile alloc.c

alloc_re.o: \
compile alloc_re.c alloc.h byte.h
	./compile alloc_re.c

argv0: \
load argv0.o strerr.a substdio.a error.a str.a
	./load argv0 strerr.a substdio.a error.a str.a 

argv0.0: \
argv0.1
	nroff -man argv0.1 > argv0.0

argv0.o: \
compile argv0.c strerr.h
	./compile argv0.c

auto-str: \
load auto-str.o substdio.a error.a str.a
	./load auto-str substdio.a error.a str.a 

auto-str.o: \
compile auto-str.c substdio.h readwrite.h exit.h
	./compile auto-str.c

auto_home.c: \
auto-str conf-home
	./auto-str auto_home `head -1 conf-home` > auto_home.c

auto_home.o: \
compile auto_home.c
	./compile auto_home.c

byte_chr.o: \
compile byte_chr.c byte.h
	./compile byte_chr.c

byte_copy.o: \
compile byte_copy.c byte.h
	./compile byte_copy.c

byte_cr.o: \
compile byte_cr.c byte.h
	./compile byte_cr.c

byte_diff.o: \
compile byte_diff.c byte.h
	./compile byte_diff.c

byte_rchr.o: \
compile byte_rchr.c byte.h
	./compile byte_rchr.c

byte_zero.o: \
compile byte_zero.c byte.h
	./compile byte_zero.c

case.0: \
case.3
	nroff -man case.3 > case.0

case.a: \
makelib case_lowers.o
	./makelib case.a case_lowers.o

case_lowers.o: \
compile case_lowers.c case.h
	./compile case_lowers.c

cdb.0: \
cdb.3
	nroff -man cdb.3 > cdb.0

cdb.a: \
makelib cdb_hash.o cdb_unpack.o cdb_seek.o
	./makelib cdb.a cdb_hash.o cdb_unpack.o cdb_seek.o

cdb_hash.o: \
compile cdb_hash.c cdb.h uint32.h
	./compile cdb_hash.c

cdb_seek.o: \
compile cdb_seek.c cdb.h uint32.h
	./compile cdb_seek.c

cdb_unpack.o: \
compile cdb_unpack.c cdb.h uint32.h
	./compile cdb_unpack.c

cdbmake.a: \
makelib cdbmake_pack.o cdbmake_hash.o cdbmake_add.o
	./makelib cdbmake.a cdbmake_pack.o cdbmake_hash.o \
	cdbmake_add.o

cdbmake_add.o: \
compile cdbmake_add.c cdbmake.h uint32.h
	./compile cdbmake_add.c

cdbmake_hash.o: \
compile cdbmake_hash.c cdbmake.h uint32.h
	./compile cdbmake_hash.c

cdbmake_pack.o: \
compile cdbmake_pack.c cdbmake.h uint32.h
	./compile cdbmake_pack.c

cdbmss.o: \
compile cdbmss.c readwrite.h seek.h alloc.h cdbmss.h cdbmake.h \
uint32.h substdio.h
	./compile cdbmss.c

check: \
it instcheck
	./instcheck

compile: \
warn-auto.sh conf-cc
	( cat warn-auto.sh; \
	echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
	) > compile
	chmod 755 compile

date@: \
warn-auto.sh date@.sh conf-home
	cat warn-auto.sh date@.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> date@
	chmod 755 date@

date@.0: \
date@.1
	nroff -man date@.1 > date@.0

delcr: \
load delcr.o substdio.a error.a str.a
	./load delcr substdio.a error.a str.a 

delcr.0: \
delcr.1
	nroff -man delcr.1 > delcr.0

delcr.o: \
compile delcr.c substdio.h subfd.h substdio.h exit.h
	./compile delcr.c

dns.lib: \
tryrsolv.c compile load socket.lib
	( ( ./compile tryrsolv.c && ./load tryrsolv \
	-lresolv `cat socket.lib` ) >/dev/null 2>&1 \
	&& echo -lresolv || exit 0 ) > dns.lib
	rm -f tryrsolv.o tryrsolv

dns.o: \
compile dns.c ip.h ipalloc.h ip.h gen_alloc.h fmt.h alloc.h str.h \
stralloc.h gen_alloc.h dns.h case.h
	./compile dns.c

env.0: \
env.3
	nroff -man env.3 > env.0

env.a: \
makelib env.o envread.o
	./makelib env.a env.o envread.o

env.o: \
compile env.c str.h alloc.h env.h
	./compile env.c

envread.o: \
compile envread.c env.h str.h
	./compile envread.c

error.0: \
error.3
	nroff -man error.3 > error.0

error.a: \
makelib error.o error_str.o
	./makelib error.a error.o error_str.o

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

error_str.0: \
error_str.3
	nroff -man error_str.3 > error_str.0

error_str.o: \
compile error_str.c error.h
	./compile error_str.c

fd.a: \
makelib fd_copy.o fd_move.o
	./makelib fd.a fd_copy.o fd_move.o

fd_copy.0: \
fd_copy.3
	nroff -man fd_copy.3 > fd_copy.0

fd_copy.o: \
compile fd_copy.c fd.h
	./compile fd_copy.c

fd_move.0: \
fd_move.3
	nroff -man fd_move.3 > fd_move.0

fd_move.o: \
compile fd_move.c fd.h
	./compile fd_move.c

finger@: \
warn-auto.sh finger@.sh conf-home
	cat warn-auto.sh finger@.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> finger@
	chmod 755 finger@

finger@.0: \
finger@.1
	nroff -man finger@.1 > finger@.0

fixcr: \
load fixcr.o substdio.a error.a str.a
	./load fixcr substdio.a error.a str.a 

fixcr.0: \
fixcr.1
	nroff -man fixcr.1 > fixcr.0

fixcr.o: \
compile fixcr.c substdio.h subfd.h substdio.h exit.h
	./compile fixcr.c

fmt_str.o: \
compile fmt_str.c fmt.h
	./compile fmt_str.c

fmt_ulong.o: \
compile fmt_ulong.c fmt.h
	./compile fmt_ulong.c

fs.a: \
makelib fmt_str.o fmt_ulong.o scan_ulong.o
	./makelib fs.a fmt_str.o fmt_ulong.o scan_ulong.o

getln.0: \
getln.3
	nroff -man getln.3 > getln.0

getln.a: \
makelib getln.o getln2.o
	./makelib getln.a getln.o getln2.o

getln.o: \
compile getln.c substdio.h byte.h stralloc.h gen_alloc.h getln.h
	./compile getln.c

getln2.0: \
getln2.3
	nroff -man getln2.3 > getln2.0

getln2.o: \
compile getln2.c substdio.h stralloc.h gen_alloc.h byte.h getln.h
	./compile getln2.c

getopt.a: \
makelib subgetopt.o sgetopt.o
	./makelib getopt.a subgetopt.o sgetopt.o

hassgact.h: \
trysgact.c compile load
	( ( ./compile trysgact.c && ./load trysgact ) >/dev/null \
	2>&1 \
	&& echo \#define HASSIGACTION 1 || exit 0 ) > hassgact.h
	rm -f trysgact.o trysgact

hassgprm.h: \
trysgprm.c compile load
	( ( ./compile trysgprm.c && ./load trysgprm ) >/dev/null \
	2>&1 \
	&& echo \#define HASSIGPROCMASK 1 || exit 0 ) > hassgprm.h
	rm -f trysgprm.o trysgprm

haswaitp.h: \
trywaitp.c compile load
	( ( ./compile trywaitp.c && ./load trywaitp ) >/dev/null \
	2>&1 \
	&& echo \#define HASWAITPID 1 || exit 0 ) > haswaitp.h
	rm -f trywaitp.o trywaitp

hier.o: \
compile hier.c auto_home.h
	./compile hier.c

http@: \
warn-auto.sh http@.sh conf-home
	cat warn-auto.sh http@.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> http@
	chmod 755 http@

http@.0: \
http@.1
	nroff -man http@.1 > http@.0

install: \
load install.o hier.o auto_home.o strerr.a substdio.a open.a error.a \
str.a
	./load install hier.o auto_home.o strerr.a substdio.a \
	open.a error.a str.a 

install.o: \
compile install.c substdio.h strerr.h error.h open.h readwrite.h \
exit.h
	./compile install.c

instcheck: \
load instcheck.o hier.o auto_home.o strerr.a substdio.a error.a str.a
	./load instcheck hier.o auto_home.o strerr.a substdio.a \
	error.a str.a 

instcheck.o: \
compile instcheck.c strerr.h error.h readwrite.h exit.h
	./compile instcheck.c

ip.o: \
compile ip.c fmt.h scan.h ip.h
	./compile ip.c

ipalloc.o: \
compile ipalloc.c alloc.h gen_allocdefs.h ip.h ipalloc.h ip.h \
gen_alloc.h
	./compile ipalloc.c

it: \
man prog install instcheck

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

makelib: \
warn-auto.sh systype
	( cat warn-auto.sh; \
	echo 'main="$$1"; shift'; \
	echo 'rm -f "$$main"'; \
	echo 'ar cr "$$main" $${1+"$$@"}'; \
	case "`cat systype`" in \
	sunos-5.*) ;; \
	unix_sv*) ;; \
	irix64-*) ;; \
	irix-*) ;; \
	dgux-*) ;; \
	hp-ux-*) ;; \
	sco*) ;; \
	*) echo 'ranlib "$$main"' ;; \
	esac \
	) > makelib
	chmod 755 makelib

man: \
tcpclient.0 tcpserver.0 tcprules.0 tcprulescheck.0 tcp-environ.0 \
who@.0 date@.0 finger@.0 http@.0 tcpcat.0 mconnect.0 fixcr.0 addcr.0 \
delcr.0 argv0.0 recordio.0 error.0 error_str.0 alloc.0 case.0 cdb.0 \
env.0 fd_copy.0 fd_move.0 getln.0 getln2.0 sgetopt.0 subgetopt.0 \
stralloc.0 wait.0

mconnect: \
warn-auto.sh mconnect.sh conf-home
	cat warn-auto.sh mconnect.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> mconnect
	chmod 755 mconnect

mconnect-io: \
load mconnect-io.o strerr.a substdio.a error.a str.a wait.a sig.a
	./load mconnect-io strerr.a substdio.a error.a str.a \
	wait.a sig.a 

mconnect-io.o: \
compile mconnect-io.c sig.h substdio.h strerr.h readwrite.h exit.h
	./compile mconnect-io.c

mconnect.0: \
mconnect.1
	nroff -man mconnect.1 > mconnect.0

ndelay.a: \
makelib ndelay.o ndelay_off.o
	./makelib ndelay.a ndelay.o ndelay_off.o

ndelay.o: \
compile ndelay.c ndelay.h
	./compile ndelay.c

ndelay_off.o: \
compile ndelay_off.c ndelay.h
	./compile ndelay_off.c

open.a: \
makelib open_read.o open_trunc.o
	./makelib open.a open_read.o open_trunc.o

open_read.o: \
compile open_read.c open.h
	./compile open_read.c

open_trunc.o: \
compile open_trunc.c open.h
	./compile open_trunc.c

prog: \
tcpclient tcpserver tcprules tcprulescheck who@ date@ finger@ http@ \
tcpcat mconnect mconnect-io fixcr addcr delcr argv0 recordio rts

recordio: \
load recordio.o strerr.a substdio.a error.a str.a fs.a fd.a sig.a
	./load recordio strerr.a substdio.a error.a str.a fs.a \
	fd.a sig.a 

recordio.0: \
recordio.1
	nroff -man recordio.1 > recordio.0

recordio.o: \
compile recordio.c sig.h substdio.h strerr.h str.h byte.h readwrite.h \
exit.h fmt.h select.h
	./compile recordio.c

remoteinfo.o: \
compile remoteinfo.c byte.h substdio.h ip.h fmt.h timeoutconn.h \
timeoutread.h timeoutwrite.h remoteinfo.h
	./compile remoteinfo.c

rts: \
warn-auto.sh rts.sh conf-home
	cat warn-auto.sh rts.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> rts
	chmod 755 rts

scan_ulong.o: \
compile scan_ulong.c scan.h
	./compile scan_ulong.c

seek.a: \
makelib seek_set.o
	./makelib seek.a seek_set.o

seek_set.o: \
compile seek_set.c seek.h
	./compile seek_set.c

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

setup: \
it install
	./install

sgetopt.0: \
sgetopt.3
	nroff -man sgetopt.3 > sgetopt.0

sgetopt.o: \
compile sgetopt.c substdio.h subfd.h substdio.h sgetopt.h subgetopt.h \
subgetopt.h
	./compile sgetopt.c

shar: \
FILES BLURB README TODO THANKS CHANGES UCSPI TCP FILES VERSION \
SYSDEPS TARGETS Makefile tcpclient.1 tcpclient.c who@.1 who@.sh \
date@.1 date@.sh finger@.1 finger@.sh http@.1 http@.sh tcpcat.1 \
tcpcat.sh mconnect.1 mconnect.sh mconnect-io.c delcr.1 delcr.c \
addcr.1 addcr.c fixcr.1 fixcr.c tcpserver.1 tcpserver.c tcprules.1 \
tcprules.c tcprulescheck.1 tcprulescheck.c tcp-environ.5 recordio.1 \
recordio.c argv0.1 argv0.c rts.sh rts.tests rts.exp conf-cc conf-ld \
find-systype.sh trycpp.c warn-auto.sh INSTALL hier.c conf-home \
auto-str.c auto_home.h install.c instcheck.c substdio.h substdio.c \
substdi.c substdo.c substdio_copy.c subfd.h subfderr.c subfdout.c \
subfdin.c readwrite.h exit.h strerr.h strerr_sys.c strerr_die.c \
error.3 error_str.3 error.h error.c error_str.c open.h open_read.c \
open_trunc.c byte.h byte_chr.c byte_copy.c byte_cr.c byte_diff.c \
byte_rchr.c byte_zero.c str.h str_chr.c str_cpy.c str_diff.c \
str_diffn.c str_len.c alloc.3 alloc.h alloc.c alloc_re.c case.3 \
case.h case_lowers.c cdb.3 cdb.h cdb_hash.c cdb_seek.c cdb_unpack.c \
cdbmake.h cdbmake_add.c cdbmake_hash.c cdbmake_pack.c cdbmss.h \
cdbmss.c dns.h dns.c trylsock.c tryrsolv.c env.3 env.h env.c \
envread.c fd.h fd_copy.3 fd_copy.c fd_move.3 fd_move.c fmt.h \
fmt_str.c fmt_ulong.c scan.h scan_ulong.c getln.3 getln.h getln.c \
getln2.3 getln2.c sgetopt.3 sgetopt.h sgetopt.c subgetopt.3 \
subgetopt.h subgetopt.c ip.h ip.c ipalloc.h ipalloc.c ndelay.h \
ndelay.c ndelay_off.c remoteinfo.h remoteinfo.c seek.h seek_set.c \
select.h1 select.h2 trysysel.c sig.h sig_block.c sig_catch.c \
sig_pause.c sig_pipe.c sig_child.c sig_term.c trysgact.c trysgprm.c \
gen_alloc.h gen_allocdefs.h stralloc.3 stralloc.h stralloc_eady.c \
stralloc_pend.c stralloc_copy.c stralloc_opyb.c stralloc_opys.c \
stralloc_cat.c stralloc_catb.c stralloc_cats.c timeoutconn.h \
timeoutconn.c timeoutread.h timeoutread.c timeoutwrite.h \
timeoutwrite.c uint32.h1 uint32.h2 tryulong32.c wait.3 wait.h \
wait_nohang.c wait_pid.c trywaitp.c
	shar -m `cat FILES` > shar
	chmod 400 shar

sig.a: \
makelib sig_block.o sig_catch.o sig_pause.o sig_pipe.o sig_child.o \
sig_term.o
	./makelib sig.a sig_block.o sig_catch.o sig_pause.o \
	sig_pipe.o sig_child.o sig_term.o

sig_block.o: \
compile sig_block.c sig.h hassgprm.h
	./compile sig_block.c

sig_catch.o: \
compile sig_catch.c sig.h hassgact.h
	./compile sig_catch.c

sig_child.o: \
compile sig_child.c sig.h
	./compile sig_child.c

sig_pause.o: \
compile sig_pause.c sig.h hassgprm.h
	./compile sig_pause.c

sig_pipe.o: \
compile sig_pipe.c sig.h
	./compile sig_pipe.c

sig_term.o: \
compile sig_term.c sig.h
	./compile sig_term.c

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

str.a: \
makelib str_chr.o str_len.o str_diff.o str_diffn.o str_cpy.o \
byte_chr.o byte_rchr.o byte_diff.o byte_copy.o byte_cr.o byte_zero.o
	./makelib str.a str_chr.o str_len.o str_diff.o str_diffn.o \
	str_cpy.o byte_chr.o byte_rchr.o byte_diff.o byte_copy.o \
	byte_cr.o byte_zero.o

str_chr.o: \
compile str_chr.c str.h
	./compile str_chr.c

str_cpy.o: \
compile str_cpy.c str.h
	./compile str_cpy.c

str_diff.o: \
compile str_diff.c str.h
	./compile str_diff.c

str_diffn.o: \
compile str_diffn.c str.h
	./compile str_diffn.c

str_len.o: \
compile str_len.c str.h
	./compile str_len.c

stralloc.0: \
stralloc.3
	nroff -man stralloc.3 > stralloc.0

stralloc.a: \
makelib stralloc_eady.o stralloc_pend.o stralloc_copy.o \
stralloc_opys.o stralloc_opyb.o stralloc_cat.o stralloc_cats.o \
stralloc_catb.o
	./makelib stralloc.a stralloc_eady.o stralloc_pend.o \
	stralloc_copy.o stralloc_opys.o stralloc_opyb.o \
	stralloc_cat.o stralloc_cats.o stralloc_catb.o

stralloc_cat.o: \
compile stralloc_cat.c byte.h stralloc.h gen_alloc.h
	./compile stralloc_cat.c

stralloc_catb.o: \
compile stralloc_catb.c stralloc.h gen_alloc.h byte.h
	./compile stralloc_catb.c

stralloc_cats.o: \
compile stralloc_cats.c byte.h str.h stralloc.h gen_alloc.h
	./compile stralloc_cats.c

stralloc_copy.o: \
compile stralloc_copy.c byte.h stralloc.h gen_alloc.h
	./compile stralloc_copy.c

stralloc_eady.o: \
compile stralloc_eady.c alloc.h stralloc.h gen_alloc.h \
gen_allocdefs.h
	./compile stralloc_eady.c

stralloc_opyb.o: \
compile stralloc_opyb.c stralloc.h gen_alloc.h byte.h
	./compile stralloc_opyb.c

stralloc_opys.o: \
compile stralloc_opys.c byte.h str.h stralloc.h gen_alloc.h
	./compile stralloc_opys.c

stralloc_pend.o: \
compile stralloc_pend.c alloc.h stralloc.h gen_alloc.h \
gen_allocdefs.h
	./compile stralloc_pend.c

strerr.a: \
makelib strerr_sys.o strerr_die.o
	./makelib strerr.a strerr_sys.o strerr_die.o

strerr_die.o: \
compile strerr_die.c substdio.h subfd.h substdio.h exit.h strerr.h
	./compile strerr_die.c

strerr_sys.o: \
compile strerr_sys.c error.h strerr.h
	./compile strerr_sys.c

subfderr.o: \
compile subfderr.c readwrite.h substdio.h subfd.h substdio.h
	./compile subfderr.c

subfdin.o: \
compile subfdin.c readwrite.h substdio.h subfd.h substdio.h
	./compile subfdin.c

subfdout.o: \
compile subfdout.c readwrite.h substdio.h subfd.h substdio.h
	./compile subfdout.c

subgetopt.0: \
subgetopt.3
	nroff -man subgetopt.3 > subgetopt.0

subgetopt.o: \
compile subgetopt.c subgetopt.h
	./compile subgetopt.c

substdi.o: \
compile substdi.c substdio.h byte.h error.h
	./compile substdi.c

substdio.a: \
makelib substdio.o substdi.o substdo.o subfderr.o subfdout.o \
subfdin.o substdio_copy.o
	./makelib substdio.a substdio.o substdi.o substdo.o \
	subfderr.o subfdout.o subfdin.o substdio_copy.o

substdio.o: \
compile substdio.c substdio.h
	./compile substdio.c

substdio_copy.o: \
compile substdio_copy.c substdio.h
	./compile substdio_copy.c

substdo.o: \
compile substdo.c substdio.h str.h byte.h error.h
	./compile substdo.c

systype: \
find-systype.sh conf-cc conf-ld trycpp.c
	( cat warn-auto.sh; \
	echo CC=\'`head -1 conf-cc`\'; \
	echo LD=\'`head -1 conf-ld`\'; \
	cat find-systype.sh; \
	) | sh > systype

tcp-environ.0: \
tcp-environ.5
	nroff -man tcp-environ.5 > tcp-environ.0

tcpcat: \
warn-auto.sh tcpcat.sh conf-home
	cat warn-auto.sh tcpcat.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> tcpcat
	chmod 755 tcpcat

tcpcat.0: \
tcpcat.1
	nroff -man tcpcat.1 > tcpcat.0

tcpclient: \
load tcpclient.o ip.o ipalloc.o dns.o remoteinfo.o timeoutconn.o \
timeoutread.o timeoutwrite.o getopt.a strerr.a stralloc.a env.a \
alloc.a ndelay.a substdio.a error.a str.a sig.a fd.a case.a fs.a \
dns.lib socket.lib
	./load tcpclient ip.o ipalloc.o dns.o remoteinfo.o \
	timeoutconn.o timeoutread.o timeoutwrite.o getopt.a \
	strerr.a stralloc.a env.a alloc.a ndelay.a substdio.a \
	error.a str.a sig.a fd.a case.a fs.a  `cat dns.lib` `cat \
	socket.lib`

tcpclient.0: \
tcpclient.1
	nroff -man tcpclient.1 > tcpclient.0

tcpclient.o: \
compile tcpclient.c strerr.h stralloc.h gen_alloc.h str.h byte.h \
sig.h fd.h ip.h ipalloc.h ip.h gen_alloc.h case.h sgetopt.h \
subgetopt.h exit.h scan.h fmt.h env.h dns.h remoteinfo.h
	./compile tcpclient.c

tcprules: \
load tcprules.o cdbmss.o cdbmake.a getln.a strerr.a stralloc.a \
substdio.a alloc.a error.a open.a seek.a str.a fs.a
	./load tcprules cdbmss.o cdbmake.a getln.a strerr.a \
	stralloc.a substdio.a alloc.a error.a open.a seek.a str.a \
	fs.a 

tcprules.0: \
tcprules.1
	nroff -man tcprules.1 > tcprules.0

tcprules.o: \
compile tcprules.c strerr.h stralloc.h gen_alloc.h getln.h substdio.h \
subfd.h substdio.h exit.h fmt.h byte.h cdbmss.h cdbmake.h uint32.h \
substdio.h
	./compile tcprules.c

tcprulescheck: \
load tcprulescheck.o cdb.a stralloc.a alloc.a strerr.a substdio.a \
error.a str.a open.a
	./load tcprulescheck cdb.a stralloc.a alloc.a strerr.a \
	substdio.a error.a str.a open.a 

tcprulescheck.0: \
tcprulescheck.1
	nroff -man tcprulescheck.1 > tcprulescheck.0

tcprulescheck.o: \
compile tcprulescheck.c substdio.h subfd.h substdio.h strerr.h \
stralloc.h gen_alloc.h alloc.h cdb.h uint32.h
	./compile tcprulescheck.c

tcpserver: \
load tcpserver.o ip.o ipalloc.o dns.o remoteinfo.o timeoutconn.o \
timeoutread.o timeoutwrite.o cdb.a open.a wait.a strerr.a stralloc.a \
env.a ndelay.a alloc.a getopt.a substdio.a error.a str.a sig.a fd.a \
case.a fs.a dns.lib socket.lib
	./load tcpserver ip.o ipalloc.o dns.o remoteinfo.o \
	timeoutconn.o timeoutread.o timeoutwrite.o cdb.a open.a \
	wait.a strerr.a stralloc.a env.a ndelay.a alloc.a getopt.a \
	substdio.a error.a str.a sig.a fd.a case.a fs.a  `cat \
	dns.lib` `cat socket.lib`

tcpserver.0: \
tcpserver.1
	nroff -man tcpserver.1 > tcpserver.0

tcpserver.o: \
compile tcpserver.c strerr.h substdio.h stralloc.h gen_alloc.h \
alloc.h readwrite.h fd.h sig.h wait.h ip.h ipalloc.h ip.h gen_alloc.h \
dns.h str.h case.h byte.h sgetopt.h subgetopt.h remoteinfo.h exit.h \
open.h scan.h fmt.h env.h cdb.h uint32.h
	./compile tcpserver.c

timeoutconn.o: \
compile timeoutconn.c ndelay.h select.h error.h readwrite.h ip.h \
byte.h timeoutconn.h
	./compile timeoutconn.c

timeoutread.o: \
compile timeoutread.c timeoutread.h select.h error.h readwrite.h
	./compile timeoutread.c

timeoutwrite.o: \
compile timeoutwrite.c timeoutwrite.h select.h error.h readwrite.h
	./compile timeoutwrite.c

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

wait.0: \
wait.3
	nroff -man wait.3 > wait.0

wait.a: \
makelib wait_nohang.o wait_pid.o
	./makelib wait.a wait_nohang.o wait_pid.o

wait_nohang.o: \
compile wait_nohang.c haswaitp.h
	./compile wait_nohang.c

wait_pid.o: \
compile wait_pid.c error.h haswaitp.h
	./compile wait_pid.c

who@: \
warn-auto.sh who@.sh conf-home
	cat warn-auto.sh who@.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> who@
	chmod 755 who@

who@.0: \
who@.1
	nroff -man who@.1 > who@.0