date and time created 87/03/26 15:07:50 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
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.
36SUBS = vaxbsubs.s
37SUBS = genbsubs.c
38
39SUBSO = vaxbsubs.o
40SUBSO = genbsubs.o
41
42ALLS = vaxbsubs.s
43ALLS =
44
45ALLO = globals.o ${SUBSO}
dc66f783
GM
46
47.s.o:
48 /lib/cpp -E $< | as -o $@
49
50systemlib: ${ALLO}
51 ar cr systemlib ${ALLO}
52 ranlib systemlib
53
54clean:
55 rm -f $(ALLO) errs makefile.bak systemlib
56
57print:
58 ${PRINT} ${ALLH} ${ALLC}
59
60tags: ${ALLC} ${ALLH}
61 ctags -t ${ALLC} ${ALLH}
62
63lint:
64 lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC}
65
66.DEFAULT:
67 sccs get $<
68
69depend:
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
87globals.o: ../ctlr/hostctlr.h ../ascii/ascebc.h ../ctlr/dctype.h
88globals.o: ../ctlr/options.h ../ctlr/screen.h ../keyboard/state.h globals.h