1984-05-17 14:06:18 +00:00
|
|
|
# $Header$
|
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
EMHOME=../..
|
1990-07-18 14:33:07 +00:00
|
|
|
CFILES=main.c getline.c lookup.c var.c process.c backward.c util.c \
|
1990-09-04 16:42:43 +00:00
|
|
|
alloc.c putline.c cleanup.c peephole.c flow.c reg.c tes.c \
|
1990-07-18 14:33:07 +00:00
|
|
|
pop_push.c
|
|
|
|
|
1984-05-17 13:42:36 +00:00
|
|
|
OFILES=main.o getline.o lookup.o var.o process.o backward.o util.o\
|
1990-09-04 16:42:43 +00:00
|
|
|
alloc.o putline.o cleanup.o peephole.o flow.o tes.o pop_push.o
|
1987-01-12 14:01:26 +00:00
|
|
|
ONOGLOB=regnoglob.o
|
|
|
|
OGLOB=regglob.o
|
|
|
|
LIBS=$(EMHOME)/lib/em_data.a
|
|
|
|
CFLAGS=-O -DNDEBUG -I$(EMHOME)/h
|
1991-02-19 16:51:50 +00:00
|
|
|
LDFLAGS=
|
1984-05-17 13:42:36 +00:00
|
|
|
LINT=lint
|
1989-10-12 16:18:38 +00:00
|
|
|
OPR=opr
|
1984-05-17 13:42:36 +00:00
|
|
|
PROPTS=
|
1989-10-20 10:37:25 +00:00
|
|
|
CPP=$(EMHOME)/lib/cpp
|
1984-05-17 13:42:36 +00:00
|
|
|
# LEXLIB is implementation dependent, try -ll or -lln first
|
1984-05-17 14:06:18 +00:00
|
|
|
LEXLIB=-ll
|
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
all: opt opt2
|
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
opt: $(OFILES) $(ONOGLOB) pattern.o $(LIBS)
|
1987-03-24 11:10:23 +00:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) $(OFILES) $(ONOGLOB) pattern.o $(LIBS) -o opt
|
1987-01-12 14:01:26 +00:00
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
opt2: $(OFILES) $(OGLOB) pattern.o $(LIBS)
|
1987-03-24 11:10:23 +00:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) $(OFILES) $(OGLOB) pattern.o $(LIBS) -o opt2
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
test: opt testopt
|
1984-05-17 13:42:36 +00:00
|
|
|
testopt
|
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
cmp: all
|
1987-01-12 14:01:26 +00:00
|
|
|
-cmp opt $(EMHOME)/lib/em_opt
|
|
|
|
-cmp opt2 $(EMHOME)/lib/em_opt2
|
1987-02-24 16:07:04 +00:00
|
|
|
-cmp em_opt.6 $(EMHOME)/man/em_opt.6
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
install:all
|
|
|
|
-size opt $(EMHOME)/lib/em_opt
|
1987-01-12 14:06:47 +00:00
|
|
|
rm -f $(EMHOME)/lib/em_opt
|
1987-01-12 14:01:26 +00:00
|
|
|
cp opt $(EMHOME)/lib/em_opt
|
|
|
|
-size opt2 $(EMHOME)/lib/em_opt2
|
1987-01-12 14:06:47 +00:00
|
|
|
rm -f $(EMHOME)/lib/em_opt2
|
1987-01-12 14:01:26 +00:00
|
|
|
cp opt2 $(EMHOME)/lib/em_opt2
|
1987-02-24 16:07:04 +00:00
|
|
|
rm -f $(EMHOME)/man/em_opt.6
|
|
|
|
cp em_opt.6 $(EMHOME)/man/em_opt.6
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
pattern.c: patterns mktab
|
1989-10-20 10:37:25 +00:00
|
|
|
$(CPP) patterns | mktab > pattern.c
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
mktab: mktab.o $(LIBS)
|
1987-03-24 11:10:23 +00:00
|
|
|
$(CC) $(CFLAGS) mktab.o $(LIBS) $(LEXLIB) -o mktab
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1989-02-06 14:37:51 +00:00
|
|
|
mktab.o: scan.c optim.h param.h pattern.h types.h
|
1987-02-23 11:02:31 +00:00
|
|
|
|
1990-11-27 16:41:13 +00:00
|
|
|
pop_push.c pop_push.h: $(EMHOME)/etc/em_table pop_push.awk
|
1990-07-18 14:33:07 +00:00
|
|
|
awk -f pop_push.awk < $(EMHOME)/etc/em_table > pop_push.c
|
|
|
|
|
1989-10-12 16:18:38 +00:00
|
|
|
depend: pattern.c
|
1987-01-12 14:01:26 +00:00
|
|
|
sed '/^#AUTOAUTO/,$$d' Makefile >Makefile.new
|
|
|
|
echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >> Makefile.new
|
1989-10-12 16:18:38 +00:00
|
|
|
cp reg.c regglob.c
|
|
|
|
cp reg.c regnoglob.c
|
1987-01-12 14:01:26 +00:00
|
|
|
mkdep $(CFILES) pattern.c regglob.c regnoglob.c | sed 's/\.c:/.o:/' >> Makefile.new
|
1989-10-12 16:18:38 +00:00
|
|
|
rm -f regglob.c regnoglob.c
|
1987-01-12 14:01:26 +00:00
|
|
|
mv Makefile Makefile.old
|
|
|
|
mv Makefile.new Makefile
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
lint: $(CFILES) pattern.c
|
|
|
|
$(LINT) $(CFLAGS) $(CFILES) pattern.c>lint 2>&1
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
printall:
|
|
|
|
-pr $(PROPTS) Makefile -n *.h `ls $(CFILES)` mktab.y scan.l patterns|$(OPR)
|
|
|
|
touch print
|
|
|
|
|
1990-07-18 14:33:07 +00:00
|
|
|
print: Makefile *.h $(CFILES) mktab.y scan.l patterns
|
1984-05-17 14:06:18 +00:00
|
|
|
-pr $(PROPTS) -n $? | $(OPR)
|
1989-10-12 16:18:38 +00:00
|
|
|
touch print
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
opr:
|
1989-10-12 16:18:38 +00:00
|
|
|
make pr | $(OPR)
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
pr:
|
1984-05-17 14:06:18 +00:00
|
|
|
@pr $(PROPTS) -n Makefile *.h $(CFILES) mktab.y scan.l patterns
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
clean:
|
1990-07-18 14:33:07 +00:00
|
|
|
rm -f *.o opt mktab mktab.c scan.c pattern.c opt2 Out \
|
|
|
|
pop_push.c pop_push.h
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1989-10-12 16:18:38 +00:00
|
|
|
regnoglob.o: reg.c
|
1990-11-27 16:41:13 +00:00
|
|
|
$(CC) $(CFLAGS) -c reg.c
|
|
|
|
mv reg.o regnoglob.o
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1989-10-12 16:18:38 +00:00
|
|
|
regglob.o: reg.c
|
1990-11-27 16:41:13 +00:00
|
|
|
$(CC) $(CFLAGS) -c -DGLOBAL_OPT reg.c
|
|
|
|
mv reg.o regglob.o
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
# the next lines are generated automatically
|
1987-01-12 14:01:26 +00:00
|
|
|
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
|
1988-09-12 09:13:49 +00:00
|
|
|
main.o: alloc.h
|
|
|
|
main.o: ext.h
|
|
|
|
main.o: param.h
|
1990-09-04 16:42:43 +00:00
|
|
|
main.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
main.o: types.h
|
|
|
|
getline.o: alloc.h
|
|
|
|
getline.o: ext.h
|
|
|
|
getline.o: line.h
|
|
|
|
getline.o: lookup.h
|
|
|
|
getline.o: param.h
|
|
|
|
getline.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
getline.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
getline.o: types.h
|
|
|
|
lookup.o: alloc.h
|
|
|
|
lookup.o: lookup.h
|
|
|
|
lookup.o: param.h
|
|
|
|
lookup.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
lookup.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
lookup.o: types.h
|
|
|
|
var.o: lookup.h
|
|
|
|
var.o: param.h
|
|
|
|
var.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
var.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
var.o: types.h
|
|
|
|
process.o: alloc.h
|
|
|
|
process.o: assert.h
|
|
|
|
process.o: ext.h
|
|
|
|
process.o: line.h
|
|
|
|
process.o: lookup.h
|
|
|
|
process.o: param.h
|
|
|
|
process.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
process.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
process.o: types.h
|
|
|
|
backward.o: alloc.h
|
|
|
|
backward.o: assert.h
|
|
|
|
backward.o: ext.h
|
|
|
|
backward.o: line.h
|
|
|
|
backward.o: lookup.h
|
|
|
|
backward.o: param.h
|
|
|
|
backward.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
backward.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
backward.o: types.h
|
|
|
|
util.o: assert.h
|
|
|
|
util.o: ext.h
|
|
|
|
util.o: lookup.h
|
|
|
|
util.o: optim.h
|
|
|
|
util.o: param.h
|
|
|
|
util.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
util.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
util.o: types.h
|
|
|
|
alloc.o: alloc.h
|
|
|
|
alloc.o: assert.h
|
|
|
|
alloc.o: line.h
|
|
|
|
alloc.o: lookup.h
|
|
|
|
alloc.o: param.h
|
|
|
|
alloc.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
alloc.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
alloc.o: types.h
|
|
|
|
putline.o: alloc.h
|
|
|
|
putline.o: assert.h
|
|
|
|
putline.o: ext.h
|
|
|
|
putline.o: line.h
|
|
|
|
putline.o: lookup.h
|
|
|
|
putline.o: optim.h
|
|
|
|
putline.o: param.h
|
|
|
|
putline.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
putline.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
putline.o: types.h
|
|
|
|
cleanup.o: assert.h
|
|
|
|
cleanup.o: ext.h
|
|
|
|
cleanup.o: lookup.h
|
|
|
|
cleanup.o: param.h
|
|
|
|
cleanup.o: types.h
|
|
|
|
peephole.o: alloc.h
|
|
|
|
peephole.o: assert.h
|
|
|
|
peephole.o: ext.h
|
|
|
|
peephole.o: line.h
|
|
|
|
peephole.o: lookup.h
|
|
|
|
peephole.o: optim.h
|
|
|
|
peephole.o: param.h
|
|
|
|
peephole.o: pattern.h
|
|
|
|
peephole.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
peephole.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
peephole.o: types.h
|
|
|
|
flow.o: alloc.h
|
|
|
|
flow.o: ext.h
|
|
|
|
flow.o: line.h
|
|
|
|
flow.o: optim.h
|
|
|
|
flow.o: param.h
|
|
|
|
flow.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
flow.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
flow.o: types.h
|
|
|
|
reg.o: alloc.h
|
|
|
|
reg.o: assert.h
|
|
|
|
reg.o: ext.h
|
|
|
|
reg.o: line.h
|
|
|
|
reg.o: param.h
|
|
|
|
reg.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
reg.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
reg.o: types.h
|
1990-09-04 16:42:43 +00:00
|
|
|
tes.o: alloc.h
|
|
|
|
tes.o: assert.h
|
|
|
|
tes.o: ext.h
|
|
|
|
tes.o: line.h
|
|
|
|
tes.o: param.h
|
|
|
|
tes.o: pop_push.h
|
|
|
|
tes.o: proinf.h
|
|
|
|
tes.o: tes.h
|
|
|
|
tes.o: types.h
|
1990-07-18 14:33:07 +00:00
|
|
|
pop_push.o: pop_push.h
|
1988-09-12 09:13:49 +00:00
|
|
|
pattern.o: param.h
|
|
|
|
pattern.o: pattern.h
|
|
|
|
pattern.o: types.h
|
|
|
|
regglob.o: alloc.h
|
|
|
|
regglob.o: assert.h
|
|
|
|
regglob.o: ext.h
|
|
|
|
regglob.o: line.h
|
|
|
|
regglob.o: param.h
|
|
|
|
regglob.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
regglob.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
regglob.o: types.h
|
|
|
|
regnoglob.o: alloc.h
|
|
|
|
regnoglob.o: assert.h
|
|
|
|
regnoglob.o: ext.h
|
|
|
|
regnoglob.o: line.h
|
|
|
|
regnoglob.o: param.h
|
|
|
|
regnoglob.o: proinf.h
|
1990-09-04 16:42:43 +00:00
|
|
|
regnoglob.o: tes.h
|
1988-09-12 09:13:49 +00:00
|
|
|
regnoglob.o: types.h
|