New directory structure.
[unix-history] / usr / src / usr.bin / tn3270 / ctlr / makefile
CommitLineData
98607a89
GM
1CC = cc
2PRINT = print
3
4DEFINES =
5
6INCLUDES = -I.
7
8OPTIMIZE = -O
9OPTIMIZE = -g
10
11CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
12
13# Lint flags
14LINTFLAGS = -hbxaz
25dbbecd
GM
15
16# Which keyboard are we emulating.
17KBD = 3180.kbd
18KBD = 3270pc.kbd
19KBD = unix.kbd
98607a89
GM
20
21# The source files...
22ALLH = dctype.h ebc_disp.h hostctlr.h kbdctlr.h options.h screen.h scrnctlr.h
23
09bc415f 24ALLC = dctype.c ebc_disp.c inbound.c oia.c options.c outbound.c
98607a89 25
09bc415f 26ALLO = dctype.o ebc_disp.o inbound.o oia.o options.o outbound.o
98607a89
GM
27
28.s.o:
29 /lib/cpp -E $< | as -o $@
30
96a643fe
GM
31ctlr.lib: ${ALLO}
32 ar cr ctlr.lib ${ALLO}
33 ranlib ctlr.lib
98607a89
GM
34
35clean:
96a643fe 36 rm -f $(ALLO) mset tn3270 prt3270 m4.out errs makefile.bak ctlr.lib
25dbbecd 37 rm -f kbd.out TMPfunc.out TMPfunc.c
98607a89
GM
38
39print:
40 ${PRINT} ${ALLH} ${M4FILE} default.map
09bc415f
GM
41 ${PRINT} ${ALLC}
42 ${PRINT} ${PRT3270MAIN}
98607a89
GM
43
44tags: ${ALLC} ${ALLH}
45 ctags -t ${ALLC} ${ALLH}
46
74db0140
GM
47action:
48 ${ACTION}
49
98607a89 50lint:
09bc415f 51 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 ${ALLC} -lcurses
98607a89
GM
52
53.DEFAULT:
54 sccs get $<
55
25dbbecd 56kbd.out: $(KBD) hostctlr.h
98607a89 57 (cd ../tools; make mkhits $(MFLAGS) )
25dbbecd 58 -/bin/rm $@ TMPfunc.out TMPfunc.c
d269ca43 59 /bin/echo \#include \"function.h\" > TMPfunc.c
25dbbecd
GM
60 $(CC) $(CFLAGS) -E TMPfunc.c > TMPfunc.out
61 ../tools/mkhits - ../ctlr/TMPfunc.out < $(KBD) > $@
62 -/bin/rm TMPfunc.out TMPfunc.c
98607a89
GM
63
64depend:
65 grep '^#include' ${ALLC} | grep -v '<' | \
66 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
67 -e 's/\.c/.o/' | \
68 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
69 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
70 else rec = rec " " $$2 } } \
71 END { print rec } ' > makedep
72 echo '$$r makedep' >>eddep
73 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
74 echo '$$r makedep' >>eddep
75 echo 'w' >>eddep
76 cp makefile makefile.bak
77 ed - makefile < eddep
78 rm eddep makedep
79
80# DO NOT DELETE THIS LINE
81
82dctype.o: dctype.h
96a643fe
GM
83inbound.o: ../general/general.h function.h hostctlr.h scrnctlr.h screen.h
84inbound.o: options.h dctype.h ebc_disp.h ../general/globals.h inbound.ext
85inbound.o: outbound.ext ../telnet.ext kbd.out
86oia.o: oia.h
87options.o: options.h ../general/globals.h options.ext
88outbound.o: ../general/general.h hostctlr.h screen.h ebc_disp.h
89outbound.o: ../general/globals.h options.ext ../telnet.ext inbound.ext
90outbound.o: outbound.ext ../general/bsubs.ext