Commit | Line | Data |
---|---|---|
2d415723 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. | |
2d415723 | 16 | # |
16b6eaa3 | 17 | # @(#)makefile 3.3 (Berkeley) %G% |
2d415723 | 18 | # |
dd6c8c3e GM |
19 | # msdos versus unix defines |
20 | O = .o | |
2b7ffe6e | 21 | #PC_O = .obj |
dd6c8c3e GM |
22 | |
23 | X = | |
2b7ffe6e GM |
24 | #PC_X = .exe |
25 | ||
26 | L = | |
27 | #PC_L = -link | |
dd6c8c3e | 28 | |
a22f4216 | 29 | CC = cc |
2b7ffe6e | 30 | #PC_CC = cl |
dd6c8c3e GM |
31 | |
32 | MV = mv | |
2b7ffe6e | 33 | #PC_MV = rename |
dd6c8c3e GM |
34 | |
35 | RM = rm -f | |
2b7ffe6e | 36 | #PC_RM= erase |
dd6c8c3e GM |
37 | |
38 | LINT_ARGS = | |
2b7ffe6e | 39 | #PC_LINT_ARGS = -DLINT_ARGS |
dd6c8c3e GM |
40 | |
41 | DEBUG_FLAGS = -g | |
2b7ffe6e | 42 | #PC_DEBUG_FLAGS = -Zi -Od |
dd6c8c3e GM |
43 | |
44 | AR = ar | |
2b7ffe6e 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 | |
2b7ffe6e | 54 | #PC_RANLIB = echo "Done with " |
dd6c8c3e | 55 | |
a22f4216 GM |
56 | PRINT = print |
57 | ||
dd6c8c3e | 58 | DEFINES = ${LINT_ARGS} |
a22f4216 GM |
59 | |
60 | INCLUDES = -I. | |
61 | ||
62 | OPTIMIZE = -O | |
dd6c8c3e | 63 | OPTIMIZE = ${DEBUG_FLAGS} |
a22f4216 GM |
64 | |
65 | CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES) | |
66 | ||
67 | # Lint flags | |
68 | LINTFLAGS = -hbxaz | |
69 | ||
c387ac4b GM |
70 | ALLH = spint.h termout.ext video.h |
71 | ||
72 | ALLC = spintc.c system.c termout.c | |
73 | ||
2abead5e | 74 | ALLASM = spintasm.asm support.asm |
a22f4216 | 75 | |
2abead5e | 76 | ALLO = spintasm$O spintc$O support$O system$O termout$O |
a22f4216 | 77 | |
c387ac4b GM |
78 | ALLPRINT = ${ALLH} ${ALLASM} ${ALLC} |
79 | ||
80 | ALLSOURCE = ${ALLPRINT} makefile makefile.mak | |
a22f4216 | 81 | |
dd6c8c3e GM |
82 | .c.obj: |
83 | ${CC} ${CFLAGS} -c $< | |
84 | ||
2b7ffe6e | 85 | syslib.a: $(ALLO) |
dd6c8c3e | 86 | ${RM} $@ |
2b7ffe6e | 87 | for i in ${ALLO}; do (${AR} ${AR1} $@ ${AR2} $$i${AR3}); done |
dd6c8c3e | 88 | ${RANLIB} $@ |
a22f4216 GM |
89 | |
90 | clean: | |
2b7ffe6e | 91 | for i in $(ALLO) errs makefile.bak syslib.a; \ |
dd6c8c3e GM |
92 | do (${RM} $$i); done |
93 | ||
94 | sccsclean: | |
62c6784b GM |
95 | -sccs clean |
96 | -sccs get makefile | |
a22f4216 | 97 | |
c387ac4b GM |
98 | sourcelist: ${ALLSOURCE} |
99 | @for i in ${ALLSOURCE}; \ | |
62c6784b | 100 | do (echo ${DIRPATH}$$i); done |
c387ac4b | 101 | |
a22f4216 | 102 | print: |
c387ac4b | 103 | ${PRINT} ${ALLPRINT} |
a22f4216 GM |
104 | |
105 | tags: ${ALLC} ${ALLH} | |
106 | ctags -t ${ALLC} ${ALLH} | |
107 | ||
108 | action: | |
109 | ${ACTION} | |
110 | ||
111 | lint: | |
112 | lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 \ | |
113 | ${TNMAIN} ${MOSTC} -lcurses | |
114 | lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${MSMAIN} map3270.c -lcurses | |
115 | ||
116 | .DEFAULT: | |
117 | sccs get $< | |
118 | ||
a22f4216 GM |
119 | depend: |
120 | grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \ | |
121 | sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ | |
dd6c8c3e | 122 | -e 's/\.c/$$O/' | \ |
a22f4216 GM |
123 | awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ |
124 | else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ | |
125 | else rec = rec " " $$2 } } \ | |
126 | END { print rec } ' > makedep | |
127 | echo '$$r makedep' >>eddep | |
128 | echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep | |
129 | echo '$$r makedep' >>eddep | |
130 | echo 'w' >>eddep | |
dd6c8c3e | 131 | -rm -f makefile.bak |
a22f4216 GM |
132 | cp makefile makefile.bak |
133 | ed - makefile < eddep | |
134 | rm eddep makedep | |
135 | ||
136 | # DO NOT DELETE THIS LINE | |
137 | ||
4718d085 GM |
138 | spintc$O: ../general/general.h spint.h |
139 | system$O: ../general/general.h ../ctlr/api.h spint.h ../general/globals.h | |
29d0babb | 140 | termout$O: ../general/general.h ../telnet.ext ../api/disp_asc.h |
dd6c8c3e GM |
141 | termout$O: ../ascii/map3270.ext ../ctlr/hostctlr.h ../ctlr/inbound.ext |
142 | termout$O: ../ctlr/oia.h ../ctlr/options.ext ../ctlr/outbound.ext | |
143 | termout$O: ../ctlr/screen.h ../general/globals.h video.h |