Fixed a typo in the ktrace man page. Added a check for a signal SIGSYS
[unix-history] / usr.bin / tn3270 / ctlr / makefile
CommitLineData
15637ed4
RG
1# @(#)makefile 4.3 (Berkeley) 5/8/91
2
3# msdos versus unix defines
4O = .o
5#PC_O = .obj
6
7X =
8#PC_X = .exe
9
10L =
11#PC_L = -link
12
13CC = cc
14#PC_CC = cl
15
16MV = mv
17#PC_MV = rename
18
19RM = rm -f
20#PC_RM= erase
21
22LINT_ARGS =
23#PC_LINT_ARGS = -DLINT_ARGS
24
25DEBUG_FLAGS = #-g
26#PC_DEBUG_FLAGS = -Zi -Od
27
28AR = ar
29AR1 = cr
30AR2 =
31AR3 =
32#PC_AR = lib
33#PC_AR1 =
34#PC_AR2 = +
35#PC_AR3 = ";"
36
37RANLIB = ranlib
38#PC_RANLIB = echo "Done with "
39
40PRINT = print
41
42DEFINES = ${LINT_ARGS}
43
44INCLUDES = -I.
45
46OPTIMIZE = -O
47OPTIMIZE = ${DEBUG_FLAGS}
48
49CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
50
51# Lint flags
52LINTFLAGS = -hbxaz
53
54# Which keyboard are we emulating.
55KBD = ${.CURDIR}/3180.kbd
56KBD = ${.CURDIR}/3270pc.kbd
57KBD = ${.CURDIR}/unix.kbd
58
59# The source files...
60ALLH = api.h declare.h externs.h function.h hostctlr.h oia.h \
61 options.h screen.h scrnctlr.h
62
63ALLC = api.c function.c inbound.c oia.c options.c outbound.c
64
65# Note: NO function.o!
66ALLO = api$O inbound$O oia$O options$O outbound$O
67
68ALLHC= ${ALLH} ${ALLC}
69ALLPRINT = 3180.kbd 3270pc.kbd unix.kbd ${ALLHC}
70
71ALLSOURCE = ${ALLPRINT} makefile makefile.mak
72
73.s.o:
74 /lib/cpp -E $< | as -o $@
75
76#.c.obj:
77# ${CC} ${CFLAGS} -c $<
78
79ctlrlib.a: ${ALLO}
80 ${RM} $@
81 for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
82 ${RANLIB} $@
83
84clean:
85 for i in $(ALLO) mset tn3270 prt3270 m4.out errs \
86 makefile.bak ctlrlib.a kbd.out TMPfunc.out; \
87 do (${RM} $$i); done
88
89sccsclean:
90 -sccs clean
91 -sccs get makefile
92
93clist: ${ALLC}
94 @for i in ${ALLC} ; \
95 do (echo ${DIRPATH}$$i); done
96
97hclist: ${ALLHC}
98 @for i in ${ALLHC} ; \
99 do (echo ${DIRPATH}$$i); done
100
101sourcelist: ${ALLSOURCE}
102 @for i in ${ALLSOURCE}; \
103 do (echo ${DIRPATH}$$i); done
104
105print:
106 ${PRINT} ${ALLPRINT}
107
108tags: ${ALLC} ${ALLH}
109 ctags -t ${ALLC} ${ALLH}
110
111action:
112 ${ACTION}
113
114lint:
115 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 ${ALLC} -lcurses
116
117.DEFAULT:
118 sccs get $<
119
120kbd.out: $(KBD) hostctlr.h
121 (cd ${.CURDIR}/../tools; make mkhits$X )
122 ${RM} $@ TMPfunc.out
123 $(CC) $(CFLAGS) -E ${.CURDIR}/function.c > TMPfunc.out
124 ../tools/mkhits ${.CURDIR}/../ctlr/hostctlr.h \
125 ../ctlr/TMPfunc.out < $(KBD) > $@
126 ${RM} TMPfunc.out
127
128depend:
129 grep '^#include' ${ALLC} | grep -v '<' | \
130 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
131 -e 's/\.c/$$O/' | \
132 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
133 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
134 else rec = rec " " $$2 } } \
135 END { print rec } ' > makedep
136 echo '$$r makedep' >>eddep
137 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
138 echo '$$r makedep' >>eddep
139 echo 'w' >>eddep
140 -rm -f makefile.bak
141 cp makefile makefile.bak
142 ed - makefile < eddep
143 rm eddep makedep
144
145# DO NOT DELETE THIS LINE
146
147api$O: api.h ../general/general.h ../api/disp_asc.h screen.h oia.h
148api$O: ../general/globals.h
149function$O: function.h
150inbound$O: ../general/general.h function.h hostctlr.h oia.h scrnctlr.h screen.h
151inbound$O: options.h ../api/dctype.h ../api/ebc_disp.h ../general/globals.h
152inbound$O: externs.h declare.h kbd.out
153oia$O: ../general/general.h oia.h ../general/globals.h
154options$O: options.h ../general/globals.h declare.h
155outbound$O: ../general/general.h hostctlr.h oia.h screen.h ../api/ebc_disp.h
156outbound$O: ../general/globals.h externs.h declare.h