mkmake, etc.
[unix-history] / usr / src / usr.bin / tn3270 / sys_curses / makefile
CommitLineData
dd6c8c3e
GM
1# msdos versus unix defines
2O = .o
3PC_O = .obj
4
5X =
6PC_X = .exe
7
117a4254 8CC = cc
dd6c8c3e
GM
9PC_CC = cl
10
11MV = mv
12PC_MV = rename
13
14RM = rm -f
15PC_RM= erase
16
17LINT_ARGS =
18PC_LINT_ARGS = -DLINT_ARGS
19
20DEBUG_FLAGS = -g
21PC_DEBUG_FLAGS = -Zi -Od
22
23AR = ar
24C =
25PC_AR = lib
26PC_C = +
27
28RANLIB = ranlib
29PC_RANLIB = echo "Done with "
30
117a4254
GM
31PRINT = print
32
dd6c8c3e 33DEFINES = ${LINT_ARGS}
117a4254
GM
34
35INCLUDES = -I.
36
37OPTIMIZE = -O
dd6c8c3e 38OPTIMIZE = ${DEBUG_FLAGS}
117a4254
GM
39
40CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
41
42# Lint flags
43LINTFLAGS = -hbxaz
44
4377cf8d
GM
45ALLH = terminal.h termout.ext
46
f33ac97e 47ALLC = system.c termout.c
117a4254 48
dd6c8c3e 49ALLO = system$O termout$O
117a4254 50
4377cf8d
GM
51ALLPRINT = ${ALLH} ${ALLC}
52
53ALLSOURCE = ${ALLPRINT} makefile
117a4254 54
dd6c8c3e
GM
55.c.obj:
56 ${CC} ${CFLAGS} -c $<
57
62c6784b 58syslib.a: $(ALLO)
dd6c8c3e
GM
59 ${RM} $@
60 for i in ${ALLO}; do (${AR} cr $@ $C $$i); done
61 ${RANLIB} $@
117a4254
GM
62
63clean:
dd6c8c3e
GM
64 for i in $(ALLO) errs makefile.bak syslib.a; \
65 do (${RM} $$i); done
66
67sccsclean:
62c6784b
GM
68 -sccs clean
69 -sccs get makefile
117a4254 70
4377cf8d
GM
71sourcelist: ${ALLSOURCE}
72 @for i in ${ALLSOURCE}; \
62c6784b 73 do (echo ${DIRPATH}$$i); done
4377cf8d 74
117a4254 75print:
4377cf8d 76 ${PRINT} ${ALLPRINT}
117a4254
GM
77
78tags: ${ALLC} ${ALLH}
79 ctags -t ${ALLC} ${ALLH}
80
0f801b82
GM
81action:
82 ${ACTION}
83
117a4254
GM
84lint:
85 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} -DTN3270 \
86 ${TNMAIN} ${MOSTC} -lcurses
87 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${MSMAIN} map3270.c -lcurses
88
89.DEFAULT:
90 sccs get $<
91
117a4254
GM
92depend:
93 grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \
94 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
dd6c8c3e 95 -e 's/\.c/$$O/' | \
117a4254
GM
96 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
97 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
98 else rec = rec " " $$2 } } \
99 END { print rec } ' > makedep
100 echo '$$r makedep' >>eddep
101 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
102 echo '$$r makedep' >>eddep
103 echo 'w' >>eddep
dd6c8c3e 104 -rm -f makefile.bak
117a4254
GM
105 cp makefile makefile.bak
106 ed - makefile < eddep
107 rm eddep makedep
108
109# DO NOT DELETE THIS LINE
110
dd6c8c3e
GM
111system$O: ../general/general.h ../api/api.h ../apilib/api_exch.h
112system$O: ../general/globals.h
113termout$O: ../general/general.h terminal.h ../telnet.ext ../apilib/disp_asc.h
114termout$O: ../ctlr/hostctlr.h ../ctlr/inbound.ext ../ctlr/oia.h
115termout$O: ../ctlr/options.ext ../ctlr/outbound.ext ../ctlr/screen.h
116termout$O: ../ascii/map3270.ext ../general/globals.h