1984-05-17 14:06:18 +00:00
|
|
|
# $Header$
|
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
EMHOME=../..
|
1984-05-17 13:42:36 +00:00
|
|
|
CFILES=main.c getline.c lookup.c var.c process.c backward.c util.c\
|
|
|
|
alloc.c putline.c cleanup.c peephole.c flow.c reg.c
|
|
|
|
OFILES=main.o getline.o lookup.o var.o process.o backward.o util.o\
|
1987-01-12 14:01:26 +00:00
|
|
|
alloc.o putline.o cleanup.o peephole.o flow.o
|
|
|
|
ONOGLOB=regnoglob.o
|
|
|
|
OGLOB=regglob.o
|
1984-05-17 13:42:36 +00:00
|
|
|
KFILES=main.k getline.k lookup.k var.k process.k backward.k util.k\
|
1987-01-12 14:01:26 +00:00
|
|
|
alloc.k putline.k cleanup.k peephole.k flow.k regnoglob.k regglob.k
|
|
|
|
LIBS=$(EMHOME)/lib/em_data.a
|
|
|
|
CFLAGS=-O -DNDEBUG -I$(EMHOME)/h
|
1984-05-17 13:42:36 +00:00
|
|
|
LDFLAGS=-i
|
|
|
|
LINT=lint
|
|
|
|
OPR=wide|opr
|
|
|
|
XREF=xref -c -w80
|
|
|
|
PROPTS=
|
|
|
|
# LEXLIB is implementation dependent, try -ll or -lln first
|
1984-05-17 14:06:18 +00:00
|
|
|
LEXLIB=-ll
|
|
|
|
|
|
|
|
.DEFAULT:
|
|
|
|
co -q $<
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
all: opt opt2
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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
|
|
|
|
1984-05-17 14:06:18 +00:00
|
|
|
test: opt testopt
|
1984-05-17 13:42:36 +00:00
|
|
|
testopt
|
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
cmp : all
|
|
|
|
-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
|
|
|
|
|
|
|
pattern.c: patterns mktab
|
1984-05-17 14:06:18 +00:00
|
|
|
/lib/cpp patterns | mktab > pattern.c
|
1984-05-17 13:42:36 +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
|
|
|
|
1987-02-23 11:02:31 +00:00
|
|
|
mktab.o: scan.c
|
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
depend: regglob.c regnoglob.c pattern.c
|
|
|
|
sed '/^#AUTOAUTO/,$$d' Makefile >Makefile.new
|
|
|
|
echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >> Makefile.new
|
|
|
|
mkdep $(CFILES) pattern.c regglob.c regnoglob.c | sed 's/\.c:/.o:/' >> Makefile.new
|
|
|
|
mv Makefile Makefile.old
|
|
|
|
mv Makefile.new Makefile
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
lint: $(CFILES) pattern.c
|
|
|
|
$(LINT) $(CFILES) pattern.c>lint 2>&1
|
|
|
|
|
|
|
|
printall:
|
|
|
|
-pr $(PROPTS) Makefile -n *.h `ls $(CFILES)` mktab.y scan.l patterns|$(OPR)
|
|
|
|
touch print
|
|
|
|
|
|
|
|
print: Makefile *.h $(CFILES) mktab.y scan.l patterns
|
1984-05-17 14:06:18 +00:00
|
|
|
-pr $(PROPTS) -n $? | $(OPR)
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
opr:
|
|
|
|
make pr ^ $(OPR)
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
xref:
|
|
|
|
$(XREF) *.h $(CFILES) | pr $(PROPTS) -h "XREF EMOPT"|$(OPR)&
|
|
|
|
|
|
|
|
sizes: opt
|
|
|
|
-nm opt | sort -n| /usr/plain/bin/map
|
|
|
|
|
|
|
|
clean:
|
1987-02-07 02:57:09 +00:00
|
|
|
rm -f *.o opt mktab mktab.c scan.c pattern.c opt2 Out
|
1984-05-17 13:42:36 +00:00
|
|
|
|
1987-01-12 14:01:26 +00:00
|
|
|
regnoglob.c: reg.c
|
1987-03-11 15:39:01 +00:00
|
|
|
-rm -f regnoglob.c
|
1987-01-12 14:01:26 +00:00
|
|
|
cp reg.c regnoglob.c
|
|
|
|
|
|
|
|
regglob.c: reg.c
|
1987-03-11 15:39:01 +00:00
|
|
|
-rm -f regglob.c
|
1987-01-12 14:01:26 +00:00
|
|
|
cp reg.c regglob.c
|
|
|
|
|
|
|
|
regglob.o: regglob.c
|
|
|
|
$(CC) $(CFLAGS) -c -DGLOBAL_OPT regglob.c
|
|
|
|
|
1984-05-17 13:42:36 +00:00
|
|
|
kfiles: $(KFILES)
|
|
|
|
|
|
|
|
.SUFFIXES: .k
|
1987-03-11 15:39:01 +00:00
|
|
|
.c.k: ; acc -c.k $*.c
|
1984-05-17 13:42:36 +00:00
|
|
|
|
|
|
|
# the next lines are generated automatically
|
1987-01-12 14:01:26 +00:00
|
|
|
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
|
|
|
|
main.o: ../../h/em_spec.h alloc.h ext.h param.h types.h
|
|
|
|
getline.o: ../../h/em_flag.h ../../h/em_mes.h ../../h/em_pseu.h ../../h/em_spec.h alloc.h ext.h line.h lookup.h param.h proinf.h types.h
|
|
|
|
lookup.o: alloc.h lookup.h param.h proinf.h types.h
|
|
|
|
var.o: lookup.h param.h proinf.h types.h
|
|
|
|
process.o: ../../h/em_pseu.h ../../h/em_spec.h alloc.h assert.h ext.h line.h lookup.h param.h proinf.h types.h
|
|
|
|
backward.o: ../../h/em_mnem.h ../../h/em_pseu.h ../../h/em_spec.h alloc.h assert.h ext.h line.h lookup.h param.h proinf.h types.h
|
|
|
|
util.o: assert.h ext.h lookup.h optim.h param.h proinf.h types.h
|
|
|
|
alloc.o: alloc.h assert.h line.h lookup.h param.h proinf.h types.h
|
|
|
|
putline.o: ../../h/em_flag.h ../../h/em_mnem.h ../../h/em_pseu.h ../../h/em_spec.h alloc.h assert.h ext.h line.h lookup.h optim.h param.h proinf.h types.h
|
|
|
|
cleanup.o: ../../h/em_mes.h ../../h/em_pseu.h ../../h/em_spec.h assert.h ext.h lookup.h param.h types.h
|
|
|
|
peephole.o: ../../h/em_mnem.h ../../h/em_spec.h alloc.h assert.h ext.h line.h lookup.h optim.h param.h pattern.h proinf.h types.h
|
|
|
|
flow.o: ../../h/em_flag.h ../../h/em_mnem.h ../../h/em_spec.h alloc.h ext.h line.h optim.h param.h proinf.h types.h
|
|
|
|
reg.o: ../../h/em_mes.h ../../h/em_pseu.h ../../h/em_spec.h alloc.h assert.h ext.h line.h param.h proinf.h types.h
|
|
|
|
pattern.o: param.h pattern.h types.h
|
|
|
|
regglob.o: ../../h/em_mes.h ../../h/em_pseu.h ../../h/em_spec.h alloc.h assert.h ext.h line.h param.h proinf.h types.h
|
|
|
|
regnoglob.o: ../../h/em_mes.h ../../h/em_pseu.h ../../h/em_spec.h alloc.h assert.h ext.h line.h param.h proinf.h types.h
|