|
| 1 | +# |
| 2 | +# START OF LOCAL CONFIGURATION INFORMATION |
| 3 | +# change the following lines to reflect your local environment |
| 4 | +# |
| 5 | + |
| 6 | +# |
| 7 | +# name of the directory into which the binary should be installed |
| 8 | +# used only when you use 'make install' |
| 9 | +# |
| 10 | +INSDIR=/usr/tmp |
| 11 | + |
| 12 | +# |
| 13 | +# choose one from each of 1) 2) and 3) below |
| 14 | +# |
| 15 | + |
| 16 | +# |
| 17 | +# 1) SELECTION OF OPERATING SYSTEM VARIETY |
| 18 | +# choose a) b) or c) |
| 19 | +# |
| 20 | +# a) for BSD derivitives, enable the following line |
| 21 | +OSFLAG= |
| 22 | + |
| 23 | +# b) for XENIX systems, enable the following line |
| 24 | +#OSFLAG=-DXENIX |
| 25 | + |
| 26 | +# b) for other A.T. and T. derivitives, enable the following line |
| 27 | +#OSFLAG=-DATT |
| 28 | + |
| 29 | +# |
| 30 | +# 2) SELECTION OF TERMINAL CONTROL LIBRARY |
| 31 | +# choose either of a) b) or c) |
| 32 | +# |
| 33 | +# a) if you use termcap, enable the following lines |
| 34 | +#TFLAG=-DM_TERMCAP |
| 35 | +#TLIB=/lib/libtermcap.a |
| 36 | + |
| 37 | +# b) if you are using terminfo on a XENIX machine, enable the following lines |
| 38 | +#TFLAG=-DM_TERMINFO |
| 39 | +#TLIB=tinfo |
| 40 | + |
| 41 | +# c) if you use terminfo on any other type of machine, |
| 42 | +# enable the following lines |
| 43 | +# |
| 44 | +# These both work on HPUX ... |
| 45 | +# |
| 46 | +#TFLAG=-DM_TERMINFO -DM_TERMCAP |
| 47 | +#TLIB=Hcurses /lib/libtermcap.a |
| 48 | +# |
| 49 | +TFLAG=-DM_TERMINFO |
| 50 | +TLIB=Hcurses |
| 51 | + |
| 52 | +# |
| 53 | +# 3) SELECTION OF WINDOW MANAGER AVAILABILITY |
| 54 | +# |
| 55 | +# if you have the Bellcore's MGR window manager, enable the following lines |
| 56 | +#VISFLAG=-DMGR |
| 57 | +#VISLIB=/usr/public/pkg/mgr/lib/libmgr.a |
| 58 | +#MGRINCDIR=-I/usr/public/pkg/mgr/include |
| 59 | +#MGRINCS=$(MGRINC)/dump.h $(MGRINC)/term.h $(MGRINC)/restart.h $(MGRINC)/window.h |
| 60 | + |
| 61 | +# |
| 62 | +# END OF LOCAL CONFIGRATION INFORMATION, the rest of this |
| 63 | +# file may be modified only at great risk |
| 64 | +# -- caveat hackor |
| 65 | +# |
| 66 | + |
| 67 | +# Copyright (c) 1988 Bellcore |
| 68 | +# All Rights Reserved |
| 69 | +# Permission is granted to copy or use this program, EXCEPT that it |
| 70 | +# may not be sold for profit, the copyright notice must be reproduced |
| 71 | +# on copies, and credit should be given to Bellcore where it is due. |
| 72 | +# BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM. |
| 73 | +# |
| 74 | + |
| 75 | +CC=cc |
| 76 | +OBJ= spiff.o output.o compare.o float.o strings.o exact.o miller.o parse.o command.o comment.o tol.o line.o token.o floatrep.o misc.o visual.o |
| 77 | +CFILES= spiff.c output.c compare.c float.c strings.c exact.c miller.c parse.c command.c comment.c tol.c line.c floatrep.c token.c misc.c visual.c |
| 78 | +HFILES=misc.h strings.h line.h float.h floatrep.h tol.h command.h comment.h token.h edit.h parse.h compare.h flagdefs.h exact.h miller.h visual.h output.h |
| 79 | +OTHER=README Makefile Sample.1 Sample.2 Sample.3 Sample.4 paper.ms paper.out |
| 80 | +MANPAGE=spiff.1 |
| 81 | + |
| 82 | +CFLAGS=-O -Ae $(OSFLAG) $(TFLAG) $(VISFLAG) |
| 83 | + |
| 84 | +default: spiff |
| 85 | + |
| 86 | +spiff: $(OBJ) |
| 87 | + $(CC) $(CFLAGS) -o spiff $(OBJ) $(VISLIB) -l$(TLIB) |
| 88 | + |
| 89 | +spiff.o: spiff.c misc.h line.h token.h tol.h command.h edit.h parse.h compare.h flagdefs.h exact.h miller.h visual.h |
| 90 | + |
| 91 | +visual.o: visual.c misc.h visual.h $(MGRINCS) |
| 92 | + $(CC) -c $(CFLAGS) $(MGRINCDIR) visual.c |
| 93 | + |
| 94 | +misc.o: misc.c visual.h misc.h |
| 95 | + |
| 96 | +parse.o: parse.c misc.h line.h command.h float.h tol.h comment.h parse.h token.h flagdefs.h |
| 97 | + @echo compiler may report 4 statement not reached warning messages for parse.c |
| 98 | + $(CC) $(CFLAGS) -c parse.c |
| 99 | + |
| 100 | +command.o: command.c float.h tol.h misc.h |
| 101 | + |
| 102 | +comment.o: comment.c misc.h comment.h |
| 103 | + |
| 104 | +tol.o: tol.c tol.h float.h |
| 105 | + |
| 106 | +output.o: output.c output.h misc.h edit.h flagdefs.h |
| 107 | + |
| 108 | +compare.o: compare.c misc.h strings.h float.h tol.h token.h line.h compare.h flagdefs.h |
| 109 | + @echo compiler may report 1 statement not reached warning message for compare.c |
| 110 | + $(CC) $(CFLAGS) -c compare.c |
| 111 | + |
| 112 | +float.o: float.c misc.h strings.h float.h floatrep.h |
| 113 | + |
| 114 | +floatrep.o: floatrep.c misc.h strings.h floatrep.h |
| 115 | + |
| 116 | +strings.o: strings.c misc.h strings.h |
| 117 | + |
| 118 | +exact.o: exact.c exact.h misc.h edit.h |
| 119 | + |
| 120 | +miller.o: miller.c miller.h misc.h edit.h token.h |
| 121 | + |
| 122 | +token.o: token.c token.h misc.h |
| 123 | + |
| 124 | +line.o: line.c line.h misc.h |
| 125 | + |
| 126 | +clean: |
| 127 | + rm -f *.o spiff |
| 128 | + |
| 129 | +clobber: clean |
| 130 | + rm -f spiff |
| 131 | +ci: |
| 132 | + ci -l -q '-m $(CIMSG)' $(CFILES) $(HFILES) $(OTHER) $(MANPAGE) |
| 133 | +col: |
| 134 | + co -l $(CFILES) $(HFILES) $(OTHER) $(MANPAGE) |
| 135 | +cirev: |
| 136 | + ci -l -r$(REV) '-m $(CIMSG)' $(CFILES) $(HFILES) $(OTHER) $(MANPAGE) |
| 137 | +cirel: |
| 138 | + ci -l -q -sRel $(CFILES) $(HFILES) $(OTHER) $(MANPAGE) |
| 139 | +lint: |
| 140 | + lint $(CFLAGS) $(CFILES) |
| 141 | +cpio: |
| 142 | + for i in $(CFILES) $(HFILES) $(OTHER) $(MANPAGE); do echo $$i; done | cpio -ocv > spiff.cpio |
| 143 | + |
| 144 | +cmd: |
| 145 | + -$(CMD) $(CFILES) $(HFILES) $(OTHER) $(MANPAGE) |
| 146 | + |
| 147 | +pot_luck_install: |
| 148 | + mv spiff $(INSDIR)/bin |
| 149 | + cp $(MANPAGE) $(INSDIR)/man/man1 |
| 150 | + |
| 151 | +BINDIR=/opt/spiff/bin |
| 152 | +MANDIR=/opt/spiff/man/man1 |
| 153 | +DOCDIR=/opt/spiff/doc |
| 154 | +EGDIR=/opt/spiff/lib |
| 155 | +install: |
| 156 | + if [ -d $(BINDIR) ]; then set +x; \ |
| 157 | + else (set -x; mkdirhier $(BINDIR)); fi |
| 158 | + bsdinst -c -s spiff $(BINDIR) |
| 159 | + if [ -d $(EGDIR) ]; then set +x; \ |
| 160 | + else (set -x; mkdirhier $(EGDIR)); fi |
| 161 | + for i in Sample.1 Sample.2 Sample.3 Sample.4; do \ |
| 162 | + (set -x; bsdinst -c -m 0644 $$i $(EGDIR)); \ |
| 163 | + done |
| 164 | + if [ -d $(MANDIR) ]; then set +x; \ |
| 165 | + else (set -x; mkdirhier $(MANDIR)); fi |
| 166 | + bsdinst -c -m 0644 spiff.1 $(MANDIR) |
| 167 | + if [ -d $(DOCDIR) ]; then set +x; \ |
| 168 | + else (set -x; mkdirhier $(DOCDIR)); fi |
| 169 | + bsdinst -c -m 0644 paper.ms $(DOCDIR) |
| 170 | + |
| 171 | + |
| 172 | + |
| 173 | + |
0 commit comments