|
|
1.1 root 1: #
2: # Copyright (c) 1988 Regents of the University of California.
3: # All rights reserved.
4: #
5: # Redistribution and use in source and binary forms are permitted
6: # provided that the above copyright notice and this paragraph are
7: # duplicated in all such forms and that any documentation,
8: # advertising materials, and other materials related to such
9: # distribution and use acknowledge that the software was developed
10: # by the University of California, Berkeley. The name of the
11: # University may not be used to endorse or promote products derived
12: # from this software without specific prior written permission.
13: # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14: # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15: # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16: #
17: # @(#)makefile 4.2 (Berkeley) 6/6/90
18: #
19: # msdos versus unix defines
20: O = .o
21: #PC_O = .obj
22:
23: X =
24: #PC_X = .exe
25:
26: L =
27: #PC_L = -link
28:
29: CC = cc
30: #PC_CC = cl
31:
32: MV = mv
33: #PC_MV = rename
34:
35: RM = rm -f
36: #PC_RM= erase
37:
38: LINT_ARGS =
39: #PC_LINT_ARGS = -DLINT_ARGS
40:
41: DEBUG_FLAGS = -g
42: #PC_DEBUG_FLAGS = -Zi -Od
43:
44: AR = ar
45: AR1 = cr
46: AR2 =
47: AR3 =
48: #PC_AR = lib
49: #PC_AR1 =
50: #PC_AR2 = +
51: #PC_AR3 = ";"
52:
53: RANLIB = ranlib
54: #PC_RANLIB = echo "Done with "
55:
56: PRINT = print
57:
58: DEFINES = ${LINT_ARGS}
59:
60: INCLUDES = -I.
61:
62: OPTIMIZE = -O
63: OPTIMIZE = ${DEBUG_FLAGS}
64:
65: CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
66:
67: # Lint flags
68: LINTFLAGS = -hbxaz
69:
70: # Which keyboard are we emulating.
71: KBD = ${.CURDIR}/3180.kbd
72: KBD = ${.CURDIR}/3270pc.kbd
73: KBD = ${.CURDIR}/unix.kbd
74:
75: # The source files...
76: ALLH = api.h declare.h externs.h function.h hostctlr.h oia.h \
77: options.h screen.h scrnctlr.h
78:
79: ALLC = api.c function.c inbound.c oia.c options.c outbound.c
80:
81: # Note: NO function.o!
82: ALLO = api$O inbound$O oia$O options$O outbound$O
83:
84: ALLHC= ${ALLH} ${ALLC}
85: ALLPRINT = 3180.kbd 3270pc.kbd unix.kbd ${ALLHC}
86:
87: ALLSOURCE = ${ALLPRINT} makefile makefile.mak
88:
89: .s.o:
90: /lib/cpp -E $< | as -o $@
91:
92: #.c.obj:
93: # ${CC} ${CFLAGS} -c $<
94:
95: ctlrlib.a: ${ALLO}
96: ${RM} $@
97: for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
98: ${RANLIB} $@
99:
100: clean:
101: for i in $(ALLO) mset tn3270 prt3270 m4.out errs \
102: makefile.bak ctlrlib.a kbd.out TMPfunc.out; \
103: do (${RM} $$i); done
104:
105: sccsclean:
106: -sccs clean
107: -sccs get makefile
108:
109: clist: ${ALLC}
110: @for i in ${ALLC} ; \
111: do (echo ${DIRPATH}$$i); done
112:
113: hclist: ${ALLHC}
114: @for i in ${ALLHC} ; \
115: do (echo ${DIRPATH}$$i); done
116:
117: sourcelist: ${ALLSOURCE}
118: @for i in ${ALLSOURCE}; \
119: do (echo ${DIRPATH}$$i); done
120:
121: print:
122: ${PRINT} ${ALLPRINT}
123:
124: tags: ${ALLC} ${ALLH}
125: ctags -t ${ALLC} ${ALLH}
126:
127: action:
128: ${ACTION}
129:
130: lint:
131: lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 ${ALLC} -lcurses
132:
133: .DEFAULT:
134: sccs get $<
135:
136: kbd.out: $(KBD) hostctlr.h
137: (cd ${.CURDIR}/../tools; make mkhits$X )
138: ${RM} $@ TMPfunc.out
139: $(CC) $(CFLAGS) -E ${.CURDIR}/function.c > TMPfunc.out
140: ../tools/mkhits ${.CURDIR}/../ctlr/hostctlr.h \
141: ../ctlr/TMPfunc.out < $(KBD) > $@
142: ${RM} TMPfunc.out
143:
144: depend:
145: grep '^#include' ${ALLC} | grep -v '<' | \
146: sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
147: -e 's/\.c/$$O/' | \
148: awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
149: else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
150: else rec = rec " " $$2 } } \
151: END { print rec } ' > makedep
152: echo '$$r makedep' >>eddep
153: echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
154: echo '$$r makedep' >>eddep
155: echo 'w' >>eddep
156: -rm -f makefile.bak
157: cp makefile makefile.bak
158: ed - makefile < eddep
159: rm eddep makedep
160:
161: # DO NOT DELETE THIS LINE
162:
163: api$O: api.h ../general/general.h ../api/disp_asc.h screen.h oia.h
164: api$O: ../general/globals.h
165: function$O: function.h
166: inbound$O: ../general/general.h function.h hostctlr.h oia.h scrnctlr.h screen.h
167: inbound$O: options.h ../api/dctype.h ../api/ebc_disp.h ../general/globals.h
168: inbound$O: externs.h declare.h kbd.out
169: oia$O: ../general/general.h oia.h ../general/globals.h
170: options$O: options.h ../general/globals.h declare.h
171: outbound$O: ../general/general.h hostctlr.h oia.h screen.h ../api/ebc_disp.h
172: outbound$O: ../general/globals.h externs.h declare.h
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.