sourcelist targets.
[unix-history] / usr / src / usr.bin / tn3270 / general / makefile
CC = cc
PRINT = print
DEFINES =
INCLUDES = -I.
OPTIMIZE = -O
OPTIMIZE = -g
CFLAGS = $(OPTIMIZE) $(INCLUDES) $(DEFINES)
# Lint flags
LINTFLAGS = -hbxaz
# How to install the bloody thing...
DESTDIR=
BINDIR = $(DESTDIR)/usr/ucb
ETCDIR = $(DESTDIR)/etc
MANDIR = $(DESTDIR)/usr/man/man
# Names for the terminal libraries...
LIBCURSES = -lcurses
LIBTERM = -ltermlib
# The source files...
ALLH = bsubs.ext general.h globals.h
ALLC = globals.c
ALLPRINT = ${ALLH} ${ALLC}
ALLSOURCE = ${ALLPRINT} makefile makefile.mak
#
# In a vax environment, we use vaxbsubs.s, which gives us a fair amount
# of increased performance. We have provided genbsubs.c, which perform
# (more or less) the same function.
SUBS = vaxbsubs.s
SUBS = genbsubs.c
SUBSO = vaxbsubs.o
SUBSO = genbsubs.o
ALLS = vaxbsubs.s
ALLS =
ALLO = globals.o ${SUBSO}
.s.o:
/lib/cpp -E $< | as -o $@
general.lib: ${ALLO}
ar cr general.lib ${ALLO}
ranlib general.lib
clean:
rm -f $(ALLO) errs makefile.bak general.lib
sourcelist: ${ALLSOURCE}
@for i in ${ALLSOURCE}; \
do (echo ${DIRPATH}/$$i); done
print:
${PRINT} ${ALLPRINT}
tags: ${ALLC} ${ALLH}
ctags -t ${ALLC} ${ALLH}
action:
${ACTION}
lint:
lint ${LINTFLAGS} ${INCLUDES} ${DEFINES} ${ALLC}
.DEFAULT:
sccs get $<
depend:
grep '^#include' ${ALLC} ${ALLH} | grep -v '<' | \
sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
-e 's/\.c/.o/' | \
awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
else rec = rec " " $$2 } } \
END { print rec } ' > makedep
echo '$$r makedep' >>eddep
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
echo '$$r makedep' >>eddep
echo 'w' >>eddep
cp makefile makefile.bak
ed - makefile < eddep
rm eddep makedep
# DO NOT DELETE THIS LINE
globals.o: ../ctlr/hostctlr.h ../ascii/ascebc.h ../ctlr/dctype.h
globals.o: ../ctlr/options.h ../ctlr/screen.h ../ascii/state.h globals.h
globals.o: ../general/general.h