Commit | Line | Data |
---|---|---|
dc66f783 GM |
1 | CC = cc |
2 | PRINT = print | |
3 | ||
4 | DEFINES = | |
5 | ||
6 | INCLUDES = -I. | |
7 | ||
8 | OPTIMIZE = -O | |
9 | OPTIMIZE = -g | |
10 | ||
11 | CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES) | |
12 | ||
13 | # Lint flags | |
14 | LINTFLAGS = -hbxaz | |
15 | # How to install the bloody thing... | |
16 | ||
17 | DESTDIR= | |
18 | ||
19 | BINDIR = $(DESTDIR)/usr/ucb | |
20 | ETCDIR = $(DESTDIR)/etc | |
21 | MANDIR = $(DESTDIR)/usr/man/man | |
22 | ||
23 | # Names for the terminal libraries... | |
24 | LIBCURSES = -lcurses | |
25 | LIBTERM = -ltermlib | |
26 | ||
27 | # The source files... | |
28 | ALLH = globals.h | |
29 | ||
30 | ALLC = globals.c | |
31 | ||
d269ca43 GM |
32 | # |
33 | # In a vax environment, we use vaxbsubs.s, which gives us a fair amount | |
34 | # of increased performance. We have provided genbsubs.c, which perform | |
35 | # (more or less) the same function. | |
36 | SUBS = vaxbsubs.s | |
37 | SUBS = genbsubs.c | |
38 | ||
39 | SUBSO = vaxbsubs.o | |
40 | SUBSO = genbsubs.o | |
41 | ||
42 | ALLS = vaxbsubs.s | |
43 | ALLS = | |
44 | ||
45 | ALLO = globals.o ${SUBSO} | |
dc66f783 GM |
46 | |
47 | .s.o: | |
48 | /lib/cpp -E $< | as -o $@ | |
49 | ||
50 | systemlib: ${ALLO} | |
51 | ar cr systemlib ${ALLO} | |
52 | ranlib systemlib | |
53 | ||
54 | clean: | |
55 | rm -f $(ALLO) errs makefile.bak systemlib | |
56 | ||
57 | print: | |
58 | ${PRINT} ${ALLH} ${ALLC} | |
59 | ||
60 | tags: ${ALLC} ${ALLH} | |
61 | ctags -t ${ALLC} ${ALLH} | |
62 | ||
63 | lint: | |
64 | lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC} | |
65 | ||
66 | .DEFAULT: | |
67 | sccs get $< | |
68 | ||
69 | depend: | |
70 | grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \ | |
71 | sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ | |
72 | -e 's/\.c/.o/' | \ | |
73 | awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ | |
74 | else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ | |
75 | else rec = rec " " $$2 } } \ | |
76 | END { print rec } ' > makedep | |
77 | echo '$$r makedep' >>eddep | |
78 | echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep | |
79 | echo '$$r makedep' >>eddep | |
80 | echo 'w' >>eddep | |
81 | cp makefile makefile.bak | |
82 | ed - makefile < eddep | |
83 | rm eddep makedep | |
84 | ||
85 | # DO NOT DELETE THIS LINE | |
86 | ||
87 | globals.o: ../ctlr/hostctlr.h ../ascii/ascebc.h ../ctlr/dctype.h | |
88 | globals.o: ../ctlr/options.h ../ctlr/screen.h ../keyboard/state.h globals.h |