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 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. 36SUBS = vaxbsubs.s 37SUBS = genbsubs.c 38 39SUBSO = vaxbsubs.o 40SUBSO = genbsubs.o 41 42ALLS = vaxbsubs.s 43ALLS = 44 45ALLO = globals.o ${SUBSO} 46 47.s.o: 48 /lib/cpp -E $< | as -o $@ 49 50general.lib: ${ALLO} 51 ar cr general.lib ${ALLO} 52 ranlib general.lib 53 54clean: 55 rm -f $(ALLO) errs makefile.bak general.lib 56 57print: 58 ${PRINT} ${ALLH} ${ALLC} 59 60tags: ${ALLC} ${ALLH} 61 ctags -t ${ALLC} ${ALLH} 62 63action: 64 ${ACTION} 65 66lint: 67 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC} 68 69.DEFAULT: 70 sccs get $< 71 72depend: 73 grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \ 74 sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ 75 -e 's/\.c/.o/' | \ 76 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 77 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 78 else rec = rec " " $$2 } } \ 79 END { print rec } ' > makedep 80 echo '$$r makedep' >>eddep 81 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep 82 echo '$$r makedep' >>eddep 83 echo 'w' >>eddep 84 cp makefile makefile.bak 85 ed - makefile < eddep 86 rm eddep makedep 87 88# DO NOT DELETE THIS LINE 89 90globals.o: ../ctlr/hostctlr.h ../ascii/ascebc.h ../ctlr/dctype.h 91globals.o: ../ctlr/options.h ../ctlr/screen.h ../ascii/state.h globals.h 92globals.o: ../general/general.h 93