sourcelist targets.
[unix-history] / usr / src / usr.bin / tn3270 / api / makefile
CommitLineData
888fdb3d
GM
1CFLAGS = -g
2PRINT = lpr -p
d4cacd81 3
888fdb3d
GM
4ALLC = apilib.c api_bsd.c api_exch.c
5ALLH = apilib.h api_exch.h
6
31b6c359
GM
7ALLPRINT = ${ALLH} ${ALLC}
8
9ALLSOURCE = ${ALLPRINT}
10
888fdb3d 11ALLO = apilib.o api_bsd.o api_exch.o
d4cacd81
GM
12
13apilib.a: ${ALLO}
14 @-/bin/rm $@
15 ar cr $@ ${ALLO}
16 ranlib $@
888fdb3d 17
31b6c359
GM
18clean:
19 -/bin/rm ${ALLO} errs apilib.a
20
21action:
22 ${ACTION}
23
888fdb3d
GM
24test: apilib.a test.o
25 ${CC} ${CFLAGS} -o $@ test.o apilib.a
26
27print:
31b6c359
GM
28 ${PRINT} ${ALLPRINT}
29
888fdb3d 30
31b6c359
GM
31sourcelist:
32 for i in ${ALLSOURCE}; \
33 do (echo ${DIRPATH}/$$i); done
888fdb3d
GM
34
35depend:
36 grep '^#include' ${ALLC} | grep -v '<' | \
37 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
38 -e 's/\.c/.o/' | \
39 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
40 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
41 else rec = rec " " $$2 } } \
42 END { print rec } ' > makedep
43 echo '$$r makedep' >>eddep
44 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
45 echo '$$r makedep' >>eddep
46 echo 'w' >>eddep
47 cp makefile makefile.bak
48 ed - makefile < eddep
49 rm eddep makedep
50
51# DO NOT DELETE THIS LINE
52
53apilib.o: ../api/api.h apilib.h
54api_bsd.o: ../api/api.h api_exch.h
55api_exch.o: api_exch.h