date and time created 86/11/16 15:33:49 by minshall
[unix-history] / usr / src / usr.bin / tn3270 / general / makefile
CommitLineData
dc66f783
GM
1CC = cc
2PRINT = print
3
4DEFINES =
5
6INCLUDES = -I.
7
8OPTIMIZE = -O
9OPTIMIZE = -g
10
11CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
12
13# Lint flags
14LINTFLAGS = -hbxaz
15# How to install the bloody thing...
16
17DESTDIR=
18
19BINDIR = $(DESTDIR)/usr/ucb
20ETCDIR = $(DESTDIR)/etc
21MANDIR = $(DESTDIR)/usr/man/man
22
23# Names for the terminal libraries...
24LIBCURSES = -lcurses
25LIBTERM = -ltermlib
26
27# The source files...
28ALLH = globals.h
29
30ALLC = globals.c
31
32ALLO = globals.o
33
34.s.o:
35 /lib/cpp -E $< | as -o $@
36
37systemlib: ${ALLO}
38 ar cr systemlib ${ALLO}
39 ranlib systemlib
40
41clean:
42 rm -f $(ALLO) errs makefile.bak systemlib
43
44print:
45 ${PRINT} ${ALLH} ${ALLC}
46
47tags: ${ALLC} ${ALLH}
48 ctags -t ${ALLC} ${ALLH}
49
50lint:
51 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC}
52
53.DEFAULT:
54 sccs get $<
55
56depend:
57 grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \
58 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
59 -e 's/\.c/.o/' | \
60 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
61 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
62 else rec = rec " " $$2 } } \
63 END { print rec } ' > makedep
64 echo '$$r makedep' >>eddep
65 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
66 echo '$$r makedep' >>eddep
67 echo 'w' >>eddep
68 cp makefile makefile.bak
69 ed - makefile < eddep
70 rm eddep makedep
71
72# DO NOT DELETE THIS LINE
73
74globals.o: ../ctlr/hostctlr.h ../ascii/ascebc.h ../ctlr/dctype.h
75globals.o: ../ctlr/options.h ../ctlr/screen.h ../keyboard/state.h globals.h