|
|
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 this notice is preserved and that due credit is given
7: # to the University of California at Berkeley. The name of the University
8: # may not be used to endorse or promote products derived from this
9: # software without specific prior written permission. This software
10: # is provided ``as is'' without express or implied warranty.
11: #
12: # @(#)makefile 3.2 (Berkeley) 3/28/88
13: #
14: # msdos versus unix defines
15: O = .o
16: #PC_O = .obj
17:
18: X =
19: #PC_X = .exe
20:
21: L =
22: #PC_L = -link
23:
24: CC = cc
25: #PC_CC = cl
26:
27: MV = mv
28: #PC_MV = rename
29:
30: RM = rm -f
31: #PC_RM= erase
32:
33: LINT_ARGS =
34: #PC_LINT_ARGS = -DLINT_ARGS
35:
36: DEBUG_FLAGS = -g
37: #PC_DEBUG_FLAGS = -Zi -Od
38:
39: AR = ar
40: AR1 = cr
41: AR2 =
42: AR3 =
43: #PC_AR = lib
44: #PC_AR1 =
45: #PC_AR2 = +
46: #PC_AR3 = ";"
47:
48: RANLIB = ranlib
49: #PC_RANLIB = echo "Done with "
50:
51: CFLAGS = ${DEBUG_FLAGS}
52:
53: PRINT = lpr -p
54:
55: KBD = 3270pc.kbd
56: KBD = unix.kbd
57:
58: ALLC = apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c \
59: disp_asc.c ebc_disp.c
60:
61: ALLH = apilib.h api_exch.h asc_ebc.h astosc.h disp_asc.h dctype.h ebc_disp.h
62:
63: ALLPRINT = ${ALLH} ${ALLC}
64:
65: ALLSOURCE = ${ALLPRINT} makefile makefile.mak
66:
67: ALLO = apilib$O api_bsd$O api_exch$O astosc$O asc_ebc$O dctype$O \
68: disp_asc$O ebc_disp$O
69:
70: .c.obj:
71: ${CC} ${CFLAGS} -c $<
72:
73: apilib.a: ${ALLO}
74: ${RM} $@
75: for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done
76: ${RANLIB} $@
77:
78: .DEFAULT:
79: sccs get $<
80:
81: clean:
82: for i in ${ALLO} errs apilib.a makefile.bak \
83: disp_out asc_disp.out astosc.out disp_asc.out \
84: test* test$O t1* t1$O t2* t2$O; \
85: do (${RM} $$i); done
86:
87: sccsclean:
88: -sccs clean
89: -sccs get makefile
90:
91: action:
92: ${ACTION}
93:
94: test: apilib.a test$O
95: ${CC} ${CFLAGS} -o $@ test$O apilib.a
96:
97: t1: apilib.a t1$O
98: ${CC} ${CFLAGS} -o $@ t1$O apilib.a
99:
100: t2: apilib.a t2$O
101: ${CC} ${CFLAGS} -o $@ t2$O apilib.a
102:
103: print:
104: ${PRINT} ${ALLPRINT}
105:
106:
107: sourcelist: ${ALLSOURCE}
108: @for i in ${ALLSOURCE}; \
109: do (echo ${DIRPATH}$$i); done
110:
111: astosc.out: ../ctlr/function.h ../ctlr/hostctlr.h ../ctlr/$(KBD)
112: (cd ../tools; make mkastosc$X )
113: ${RM} $@
114: ../tools/mkastosc < ../ctlr/$(KBD) > $@
115:
116: asc_disp.out: ebc_disp$O
117: (cd ../tools; make mkastods$X )
118: ${RM} $@
119: ../tools/mkastods > $@
120:
121: disp_asc.out: ebc_disp$O
122: (cd ../tools; make mkdstoas$X )
123: ${RM} $@
124: ../tools/mkdstoas > $@
125:
126: depend:
127: grep '^#include' ${ALLC} | grep -v '<' | \
128: sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
129: -e 's/\.c/$$O/' | \
130: awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
131: else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
132: else rec = rec " " $$2 } } \
133: END { print rec } ' > makedep
134: echo '$$r makedep' >>eddep
135: echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
136: echo '$$r makedep' >>eddep
137: echo 'w' >>eddep
138: -rm -f makefile.bak
139: cp makefile makefile.bak
140: ed - makefile < eddep
141: rm eddep makedep
142:
143: # DO NOT DELETE THIS LINE
144:
145: apilib$O: ../ctlr/api.h apilib.h
146: api_bsd$O: ../ctlr/api.h api_exch.h
147: api_exch$O: ../general/general.h api_exch.h
148: asc_ebc$O: asc_ebc.h
149: astosc$O: ../general/general.h ../ctlr/function.h astosc.h astosc.out
150: dctype$O: dctype.h
151: disp_asc$O: disp_asc.h asc_disp.out disp_asc.out
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.