2
# %Z%%M% %I% %E% 1990 by Robin Miller
4
#/****************************************************************************
6
# * COPYRIGHT (c) 1990 - 2004 *
7
# * This Software Provided *
9
# * Robin's Nest Software Inc. *
11
# * Permission to use, copy, modify, distribute and sell this software and *
12
# * its documentation for any purpose and without fee is hereby granted *
13
# * provided that the above copyright notice appear in all copies and that *
14
# * both that copyright notice and this permission notice appear in the *
15
# * supporting documentation, and that the name of the author not be used *
16
# * in advertising or publicity pertaining to distribution of the software *
17
# * without specific, written prior permission. *
19
# * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *
20
# * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN *
21
# * NO EVENT SHALL HE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL *
22
# * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR *
23
# * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS *
24
# * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF *
27
# ****************************************************************************/
29
# Makefile -- makefile for program 'dt'
32
### MKMF:DEFINITIONS ###
35
# System makefile definitions for program makefiles
40
# @lint -i $(LINTFLAGS) $<
41
@lint -c $(LINTFLAGS) $<
45
# @$(GET) -G$*.c $(GFLAGS) $<
46
# @lint -i $(LINTFLAGS) $*.c
47
# @lint -c $(LINTFLAGS) $*.c
54
TR_PRINTER= $(PRINTER)
58
# Libraries the program links to which are considered volatile
62
# Libraries considered static
68
# P or G flag ( override on command line by invoking make PORG=-g )
75
CFLAGS= $(PORG) -DAIO -DMMAP -DFIFO -DTTY -DRAND48 -DAIX -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_BIG_ENDIAN_=1
76
CPP= /usr/local/bin/cpp
81
# end of system makefile definitions
108
OBJS= ${CFILES:.c=.o}
111
### MKMF:LINTOBJS ###
113
LINTOBJS= ${CFILES:.c=.ln}
121
# system targets for program makefile
124
$(PROGRAM): $(OBJS) $(XOBJS) $(LIBS)
125
# @echo -n loading $(PROGRAM) ...
126
$(CC) -o $(PROGRAM) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) $(EXTLIBS)
130
@$(PRINTER) $(PRINTFLAGS) $(CFILES)
133
@vgrind $(CFILES) | $(TROFFPRINTER) $(TROFFPRINTERFLAGS)
136
lint $(LINTFLAGS) $(LINTOBJS) $(LINTLIBS)
140
@rm -f $(OBJS) $(PROGRAM)
142
tags: $(CFILES) $(HDRS)
143
ctags -wt $(CFILES) $(HDRS)
145
# end of system targets for program makefile
149
echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
150
echo '$$r makedep' >>eddep
152
cp Makefile Makefile.bak
153
ex - Makefile < eddep
154
rm eddep makedep makedep1 makedeperrs
156
# Kinda Micky Mouse, but it's better than nothing (IMHO) :-)
158
@cat /dev/null >makedep
159
-(for i in ${CFILES} ; do \
160
${CPP} ${CPPOPTS} $$i >> makedep; done) \
163
-e 's,\/local\/lib\/gcc-lib/\(.*\)\/include,\/include,' \
164
-e 's,^\(.*\)\.o:,\1.o \1.ln:,' makedep > makedep1
165
${AWK} ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
166
else { if (length(rec $$3) > 78) { print rec; rec = $$0; } \
167
else rec = rec " " $$3 } } \
168
END { print rec } ' makedep1 > makedep
170
@(if [ -s makedeperrs ]; then false; fi)
173
# DO NOT DELETE THIS LINE