Commit | Line | Data |
---|---|---|
ee01fcaa KB |
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 | |
16b6eaa3 KB |
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. | |
ee01fcaa | 16 | # |
1c15e888 | 17 | # @(#)makefile 4.2 (Berkeley) 6/6/90 |
ee01fcaa | 18 | # |
dd6c8c3e GM |
19 | # msdos versus unix defines |
20 | O = .o | |
2be8256b | 21 | #PC_O = .obj |
dd6c8c3e GM |
22 | |
23 | X = | |
2be8256b GM |
24 | #PC_X = .exe |
25 | ||
26 | L = | |
27 | #PC_L = -link | |
dd6c8c3e | 28 | |
97efe1fa | 29 | CC = cc |
2be8256b | 30 | #PC_CC = cl |
dd6c8c3e GM |
31 | |
32 | MV = mv | |
2be8256b | 33 | #PC_MV = rename |
dd6c8c3e GM |
34 | |
35 | RM = rm -f | |
2be8256b | 36 | #PC_RM= erase |
dd6c8c3e GM |
37 | |
38 | LINT_ARGS = | |
2be8256b | 39 | #PC_LINT_ARGS = -DLINT_ARGS |
dd6c8c3e GM |
40 | |
41 | DEBUG_FLAGS = -g | |
2be8256b | 42 | #PC_DEBUG_FLAGS = -Zi -Od |
dd6c8c3e GM |
43 | |
44 | AR = ar | |
2be8256b GM |
45 | AR1 = cr |
46 | AR2 = | |
47 | AR3 = | |
48 | #PC_AR = lib | |
49 | #PC_AR1 = | |
50 | #PC_AR2 = + | |
51 | #PC_AR3 = ";" | |
dd6c8c3e GM |
52 | |
53 | RANLIB = ranlib | |
2be8256b | 54 | #PC_RANLIB = echo "Done with " |
dd6c8c3e | 55 | |
97efe1fa GM |
56 | PRINT = print |
57 | ||
dd6c8c3e | 58 | DEFINES = ${LINT_ARGS} |
03bae598 | 59 | |
97efe1fa GM |
60 | INCLUDES = -I. |
61 | ||
62 | OPTIMIZE = -O | |
dd6c8c3e | 63 | OPTIMIZE = ${DEBUG_FLAGS} |
97efe1fa GM |
64 | |
65 | CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES) | |
66 | ||
67 | # Lint flags | |
68 | LINTFLAGS = -hbxaz | |
69 | ||
03bae598 GM |
70 | KBD = 3270pc.kbd |
71 | KBD = unix.kbd | |
72 | ||
73 | ||
97efe1fa | 74 | # The source files... |
999b077a | 75 | ALLH = map3270.h state.h |
03bae598 | 76 | |
62c6784b | 77 | ALLC = map3270.c mset.c termin.c |
97efe1fa | 78 | |
dd6c8c3e GM |
79 | # We don't include mset$O here... |
80 | ALLO = map3270$O termin$O | |
97efe1fa | 81 | |
73f6a95a GM |
82 | |
83 | ALLHC= ${ALLH} ${ALLC} | |
11d997a6 | 84 | ALLPRINT = default.map ${ALLHC} |
4377cf8d GM |
85 | |
86 | ALLSOURCE = ${ALLPRINT} makefile makefile.mak | |
87 | ||
97efe1fa GM |
88 | .s.o: |
89 | /lib/cpp -E $< | as -o $@ | |
90 | ||
c6e1b91b PB |
91 | #.c.obj: |
92 | # ${CC} ${CFLAGS} -c $< | |
dd6c8c3e | 93 | |
62c6784b | 94 | asciilib.a: $(ALLO) |
dd6c8c3e | 95 | ${RM} $@ |
2be8256b | 96 | for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done |
dd6c8c3e | 97 | ${RANLIB} $@ |
97efe1fa GM |
98 | |
99 | clean: | |
dd6c8c3e GM |
100 | for i in $(ALLO) errs makefile.bak asciilib.a; \ |
101 | do (${RM} $$i); done | |
102 | ||
103 | sccsclean: | |
62c6784b GM |
104 | -sccs clean |
105 | -sccs get makefile | |
97efe1fa | 106 | |
73f6a95a GM |
107 | clist: ${ALLC} |
108 | @for i in ${ALLC} ; \ | |
109 | do (echo ${DIRPATH}$$i); done | |
110 | ||
111 | hclist: ${ALLHC} | |
112 | @for i in ${ALLHC} ; \ | |
113 | do (echo ${DIRPATH}$$i); done | |
114 | ||
4377cf8d GM |
115 | sourcelist: ${ALLSOURCE} |
116 | @for i in ${ALLSOURCE}; \ | |
62c6784b | 117 | do (echo ${DIRPATH}$$i); done |
4377cf8d | 118 | |
97efe1fa | 119 | print: |
4377cf8d | 120 | ${PRINT} ${ALLPRINT} |
97efe1fa GM |
121 | |
122 | tags: ${ALLC} ${ALLH} | |
123 | ctags -t ${ALLC} ${ALLH} | |
124 | ||
74db0140 GM |
125 | action: |
126 | ${ACTION} | |
127 | ||
97efe1fa | 128 | lint: |
03bae598 | 129 | lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC} |
97efe1fa GM |
130 | |
131 | .DEFAULT: | |
132 | sccs get $< | |
133 | ||
134 | depend: | |
135 | grep '^#include' ${ALLC} | grep -v '<' | \ | |
136 | sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ | |
dd6c8c3e | 137 | -e 's/\.c/$$O/' | \ |
97efe1fa GM |
138 | awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ |
139 | else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ | |
140 | else rec = rec " " $$2 } } \ | |
141 | END { print rec } ' > makedep | |
142 | echo '$$r makedep' >>eddep | |
143 | echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep | |
144 | echo '$$r makedep' >>eddep | |
145 | echo 'w' >>eddep | |
dd6c8c3e | 146 | -rm -f makefile.bak |
97efe1fa GM |
147 | cp makefile makefile.bak |
148 | ed - makefile < eddep | |
149 | rm eddep makedep | |
150 | ||
151 | # DO NOT DELETE THIS LINE | |
152 | ||
db693c34 GM |
153 | map3270$O: state.h map3270.h ../general/globals.h default.map |
154 | mset$O: ../ctlr/function.h state.h map3270.h ../api/astosc.h | |
155 | mset$O: ../general/globals.h | |
156 | termin$O: ../general/general.h ../ctlr/function.h ../ctlr/externs.h | |
157 | termin$O: ../ctlr/declare.h ../api/astosc.h state.h ../general/globals.h |