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 | ||
32 | ALLO = globals.o | |
33 | ||
34 | .s.o: | |
35 | /lib/cpp -E $< | as -o $@ | |
36 | ||
37 | systemlib: ${ALLO} | |
38 | ar cr systemlib ${ALLO} | |
39 | ranlib systemlib | |
40 | ||
41 | clean: | |
42 | rm -f $(ALLO) errs makefile.bak systemlib | |
43 | ||
44 | print: | |
45 | ${PRINT} ${ALLH} ${ALLC} | |
46 | ||
47 | tags: ${ALLC} ${ALLH} | |
48 | ctags -t ${ALLC} ${ALLH} | |
49 | ||
50 | lint: | |
51 | lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC} | |
52 | ||
53 | .DEFAULT: | |
54 | sccs get $< | |
55 | ||
56 | depend: | |
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 | ||
74 | globals.o: ../ctlr/hostctlr.h ../ascii/ascebc.h ../ctlr/dctype.h | |
75 | globals.o: ../ctlr/options.h ../ctlr/screen.h ../keyboard/state.h globals.h |