ack/lang/pc/comp/Makefile

538 lines
12 KiB
Makefile
Raw Normal View History

1988-10-26 15:21:11 +00:00
# make iso-pascal "compiler"
EMHOME = ../../..
1989-05-03 10:30:22 +00:00
MDIR = $(EMHOME)/modules
MHDIR = $(MDIR)/h
PKGDIR = $(MDIR)/pkg
LIBDIR = $(MDIR)/lib
1988-10-26 15:21:11 +00:00
LLGEN = $(EMHOME)/bin/LLgen
MKDEP = $(EMHOME)/bin/mkdep
1989-05-03 10:30:22 +00:00
PRID = $(EMHOME)/bin/prid
CID = $(EMHOME)/bin/cid
OPR = opr
1989-05-03 10:30:22 +00:00
CURRDIR =
1988-10-26 15:21:11 +00:00
CC = fcc
1989-05-03 10:30:22 +00:00
CC = cc
LINT = lint
MACH = sun3
BACK = back
MALLOC = $(LIBDIR)/malloc.o
EMELIB = $(LIBDIR)/libem_mes.a \
$(LIBDIR)/libeme.a \
$(EMHOME)/lib/em_data.a
EMKLIB = $(LIBDIR)/libem_mes.a $(LIBDIR)/libemk.a
MODLIB = $(LIBDIR)/libinput.a \
$(LIBDIR)/libassert.a \
$(LIBDIR)/liballoc.a \
$(MALLOC) \
$(LIBDIR)/libprint.a \
$(LIBDIR)/libstring.a \
$(LIBDIR)/libsystem.a
EMCELIB = $(LIBDIR)/libem_mesCE.a \
$(EMHOME)/lib/$(MACH)/ce.a \
$(EMHOME)/lib/$(MACH)/$(BACK).a \
$(LIBDIR)/libflt.a \
$(LIBDIR)/libobject.a \
$(EMHOME)/lib/em_data.a
EMOCELIB = $(LIBDIR)/libem_mesO.a \
$(LIBDIR)/libCEopt.a \
$(EMHOME)/lib/$(MACH)/ce.a \
$(EMHOME)/lib/$(MACH)/$(BACK).a \
$(LIBDIR)/libflt.a \
$(LIBDIR)/libobject.a \
$(EMHOME)/lib/em_data.a
LIBS = $(EMKLIB) $(MODLIB)
CELIBS = $(EMCELIB) $(MODLIB)
OLIBS = $(EMOCELIB) $(MODLIB)
1989-05-03 10:30:22 +00:00
1988-10-26 15:21:11 +00:00
GFILES = tokenfile.g declar.g expression.g program.g statement.g
LLGENOPTIONS =
PROFILE =
1989-05-03 10:30:22 +00:00
COPTIONS =
INCLUDES = -I$(MHDIR) -I$(EMHOME)/h -I$(PKGDIR)
OPTIM= -O
CFLAGS = $(PROFILE) $(INCLUDES) $(OPTIM) $(COPTIONS) -DSTATIC=
LINTFLAGS = -DSTATIC= -DNORCSID
LDFLAGS = -i $(PROFILE)
1988-10-26 15:21:11 +00:00
LSRC = declar.c expression.c program.c statement.c tokenfile.c
LOBJ = declar.o expression.o program.o statement.o tokenfile.o
CSRC = LLlex.c LLmessage.c body.c chk_expr.c code.c\
1988-10-26 15:21:11 +00:00
cstoper.c def.c desig.c enter.c error.c idf.c input.c label.c\
lookup.c main.c misc.c node.c options.c readwrite.c\
1990-12-11 13:52:08 +00:00
scope.c symbol2str.c tokenname.c type.c typequiv.c progs.c stab.c
1988-10-26 15:21:11 +00:00
COBJ = LLlex.o LLmessage.o body.o casestat.o char.o chk_expr.o code.o\
cstoper.o def.o desig.o enter.o error.o idf.o input.o label.o\
1990-12-11 13:52:08 +00:00
lookup.o main.o misc.o next.o node.o options.o readwrite.o scope.o\
symbol2str.o tmpvar.o tokenname.o type.o typequiv.o progs.o stab.o
# Extra object for generating peephole-optimizer-code-expander version.
# The Sun-3 version is faster when the text-size exceeds 180K! ARRGH
EXTRA_O =
OBJ = Lpars.o $(COBJ) $(LOBJ) $(EXTRA_O)
1988-10-26 15:21:11 +00:00
# Keep the next entries up to date!
1989-05-03 10:30:22 +00:00
GENCFILES= $(LSRC) Lpars.c symbol2str.c casestat.c tmpvar.c char.c next.c
SRC = $(CSRC) $(GENCFILES)
1988-10-26 15:21:11 +00:00
GENGFILES= tokenfile.g
GENHFILES= Lpars.h debugcst.h density.h errout.h idfsize.h inputtype.h\
numsize.h strsize.h def.h type.h desig.h scope.h node.h\
1989-05-03 10:30:22 +00:00
target_sizes.h nocross.h
1988-10-26 15:21:11 +00:00
HFILES= LLlex.h chk_expr.h class.h const.h debug.h def.h desig.h\
f_info.h idf.h input.h main.h misc.h node.h required.h scope.h\
tokenname.h type.h $(GENHFILES)
#
GENFILES = $(GENGFILES) $(GENCFILES) $(GENHFILES)
NEXTFILES = def.H desig.H node.H scope.H type.H casestat.C tmpvar.C
#EXCLEXCLEXCLEXCL
all: Cfiles
1989-05-03 10:30:22 +00:00
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) $(CURRDIR)main ; else EMHOME=$(EMHOME); export EMHOME; sh Resolve main ; fi'
@rm -f nmclash.o a.out
Omain: Cfiles
rm -f *.o
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DPEEPHOLE "EXTRA_O="$(EXTRA_O) "BACK="$(BACK) $(CURRDIR)omain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve omain ; fi'
1989-05-03 10:30:22 +00:00
@rm -f nmclash.o a.out
CEmain: Cfiles
rm -f *.o
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "MACH="$(MACH) "EMHOME="$(EMHOME) "COPTIONS="-DCODE_EXPANDER "BACK="$(BACK) $(CURRDIR)cemain ; else MACH=$(MACH); export MACH; EMHOME=$(EMHOME); export EMHOME; ./Resolve cemain ; fi'
1989-05-03 10:30:22 +00:00
@rm -f nmclash.o a.out
install: all
cp $(CURRDIR)main $(EMHOME)/lib/em_pc
cmp: all
-cmp $(CURRDIR)main $(EMHOME)/lib/em_pc
opr:
make pr | $(OPR)
1989-05-03 10:30:22 +00:00
pr:
@pr Makefile Resolve Parameters $(GFILES) *.H $(HFILES) *.C $(CSRC)
1988-10-26 15:21:11 +00:00
clean:
1989-05-03 10:30:22 +00:00
rm -f $(OBJ) $(CURRDIR)main $(GENFILES) hfiles Cfiles LLfiles clashes \
LL.output
(cd .. ; rm -rf Xsrc)
lint: Cfiles
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make "EMHOME="$(EMHOME) Xlint ; else EMHOME=$(EMHOME); export EMHOME; sh Resolve Xlint ; fi'
@rm -f nmclash.o a.out
longnames: $(SRC) $(HFILES)
sh -c 'if test -f longnames ; then $(PRID) -l7 longnames $? > Xlongnames ; mv Xlongnames longnames ; else $(PRID) -l7 $? > longnames ; fi'
1988-10-26 15:21:11 +00:00
# entry points not to be used directly
1989-05-03 10:30:22 +00:00
Cfiles: hfiles LLfiles $(GENCFILES) $(GENHFILES) Makefile
1988-10-26 15:21:11 +00:00
echo $(SRC) $(HFILES) > Cfiles
LLfiles: $(GFILES)
$(LLGEN) $(LLGENOPTIONS) $(GFILES)
@touch LLfiles
1989-05-03 10:30:22 +00:00
hfiles: Parameters make.hfiles
1988-10-26 15:21:11 +00:00
make.hfiles Parameters
touch hfiles
tokenfile.g: tokenname.c make.tokfile
make.tokfile < tokenname.c > tokenfile.g
symbol2str.c: tokenname.c make.tokcase
make.tokcase < tokenname.c > symbol2str.c
.SUFFIXES: .H .h
.H.h:
./make.allocd < $*.H > $*.h
.SUFFIXES: .C .c
.C.c:
./make.allocd < $*.C > $*.c
def.h: make.allocd
type.h: make.allocd
node.h: make.allocd
scope.h: make.allocd
desig.h: make.allocd
casestat.c: make.allocd
tmpvar.c: make.allocd
next.c: $(NEXTFILES) ./make.next
./make.next $(NEXTFILES) > next.c
1989-05-03 10:30:22 +00:00
char.c: char.tab
$(EMHOME)/bin/tabgen -fchar.tab > char.c
1988-10-26 15:21:11 +00:00
1989-05-03 10:30:22 +00:00
depend: Cfiles
1988-10-26 15:21:11 +00:00
sed '/^#AUTOAUTO/,$$d' Makefile > Makefile.new
echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >> Makefile.new
$(MKDEP) $(SRC) |\
sed 's/\.c:/\.o:/' >> Makefile.new
mv Makefile Makefile.old
mv Makefile.new Makefile
print: $(CSRC) $(GFILES) $(HFILES) # print recently changed files
pr -t $? | $(OPR)
1988-10-26 15:21:11 +00:00
@touch print
1989-05-03 10:30:22 +00:00
xref:
1988-10-26 15:21:11 +00:00
ctags -x $(CSRC) $(HFILES) | sed "s/).*/)/">Xref
#INCLINCLINCLINCL
1989-05-03 10:30:22 +00:00
Xlint:
$(LINT) $(INCLUDES) $(LINTFLAGS) $(SRC) \
$(LIBDIR)/llib-lem_mes.ln \
$(LIBDIR)/llib-lemk.ln \
$(LIBDIR)/llib-linput.ln \
$(LIBDIR)/llib-lassert.ln \
$(LIBDIR)/llib-lalloc.ln \
$(LIBDIR)/llib-lprint.ln \
$(LIBDIR)/llib-lstring.ln \
$(LIBDIR)/llib-lsystem.ln
$(CURRDIR)main: $(OBJ) $(CURRDIR)Makefile
-mv $(CURRDIR)main $(CURRDIR)main.old
$(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o $(CURRDIR)main
-size $(CURRDIR)main.old
1989-05-03 10:30:22 +00:00
size $(CURRDIR)main
$(CURRDIR)omain: $(OBJ) #$(CURRDIR)Makefile
$(CC) $(LDFLAGS) $(OBJ) $(OLIBS) -o $(CURRDIR)omain
-size $(CURRDIR)omain
1989-05-03 10:30:22 +00:00
$(CURRDIR)cemain: $(OBJ) #$(CURRDIR)Makefile
$(CC) $(LDFLAGS) $(OBJ) $(CELIBS) -o $(CURRDIR)cemain
-size $(CURRDIR)cemain
1988-10-26 15:21:11 +00:00
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
LLlex.o: LLlex.h
LLlex.o: Lpars.h
LLlex.o: class.h
LLlex.o: const.h
LLlex.o: debug.h
LLlex.o: debugcst.h
LLlex.o: f_info.h
LLlex.o: idf.h
LLlex.o: idfsize.h
LLlex.o: input.h
LLlex.o: inputtype.h
LLlex.o: main.h
1989-05-03 10:30:22 +00:00
LLlex.o: nocross.h
1988-10-26 15:21:11 +00:00
LLlex.o: numsize.h
LLlex.o: strsize.h
1989-05-03 10:30:22 +00:00
LLlex.o: target_sizes.h
1988-10-26 15:21:11 +00:00
LLlex.o: type.h
LLmessage.o: LLlex.h
LLmessage.o: Lpars.h
LLmessage.o: idf.h
1989-05-03 10:30:22 +00:00
LLmessage.o: nocross.h
LLmessage.o: target_sizes.h
1988-10-26 15:21:11 +00:00
LLmessage.o: type.h
body.o: LLlex.h
body.o: chk_expr.h
body.o: debug.h
body.o: debugcst.h
body.o: def.h
body.o: desig.h
body.o: idf.h
body.o: main.h
1989-05-03 10:30:22 +00:00
body.o: misc.h
body.o: nocross.h
1988-10-26 15:21:11 +00:00
body.o: node.h
body.o: scope.h
1989-05-03 10:30:22 +00:00
body.o: target_sizes.h
1988-10-26 15:21:11 +00:00
body.o: type.h
chk_expr.o: LLlex.h
chk_expr.o: Lpars.h
chk_expr.o: chk_expr.h
chk_expr.o: const.h
chk_expr.o: debug.h
chk_expr.o: debugcst.h
chk_expr.o: def.h
chk_expr.o: idf.h
chk_expr.o: main.h
chk_expr.o: misc.h
1989-05-03 10:30:22 +00:00
chk_expr.o: nocross.h
1988-10-26 15:21:11 +00:00
chk_expr.o: node.h
chk_expr.o: required.h
chk_expr.o: scope.h
1989-05-03 10:30:22 +00:00
chk_expr.o: target_sizes.h
1988-10-26 15:21:11 +00:00
chk_expr.o: type.h
code.o: LLlex.h
code.o: Lpars.h
code.o: debug.h
code.o: debugcst.h
code.o: def.h
code.o: desig.h
1990-12-11 14:09:02 +00:00
code.o: f_info.h
code.o: idf.h
1988-10-26 15:21:11 +00:00
code.o: main.h
1989-05-03 10:30:22 +00:00
code.o: misc.h
code.o: nocross.h
1988-10-26 15:21:11 +00:00
code.o: node.h
code.o: required.h
code.o: scope.h
1989-05-03 10:30:22 +00:00
code.o: target_sizes.h
1988-10-26 15:21:11 +00:00
code.o: type.h
cstoper.o: LLlex.h
cstoper.o: Lpars.h
cstoper.o: const.h
cstoper.o: debug.h
cstoper.o: debugcst.h
1989-05-03 10:30:22 +00:00
cstoper.o: nocross.h
1988-10-26 15:21:11 +00:00
cstoper.o: node.h
cstoper.o: required.h
cstoper.o: target_sizes.h
cstoper.o: type.h
def.o: LLlex.h
def.o: debug.h
def.o: debugcst.h
def.o: def.h
def.o: idf.h
def.o: main.h
def.o: misc.h
1989-05-03 10:30:22 +00:00
def.o: nocross.h
1988-10-26 15:21:11 +00:00
def.o: node.h
def.o: scope.h
1989-05-03 10:30:22 +00:00
def.o: target_sizes.h
1988-10-26 15:21:11 +00:00
def.o: type.h
desig.o: LLlex.h
desig.o: debug.h
desig.o: debugcst.h
desig.o: def.h
desig.o: desig.h
1989-05-03 10:30:22 +00:00
desig.o: idf.h
1988-10-26 15:21:11 +00:00
desig.o: main.h
1989-05-03 10:30:22 +00:00
desig.o: nocross.h
1988-10-26 15:21:11 +00:00
desig.o: node.h
desig.o: scope.h
1989-05-03 10:30:22 +00:00
desig.o: target_sizes.h
1988-10-26 15:21:11 +00:00
desig.o: type.h
enter.o: LLlex.h
enter.o: def.h
enter.o: idf.h
enter.o: main.h
1989-05-03 10:30:22 +00:00
enter.o: nocross.h
1988-10-26 15:21:11 +00:00
enter.o: node.h
enter.o: scope.h
1989-05-03 10:30:22 +00:00
enter.o: target_sizes.h
1988-10-26 15:21:11 +00:00
enter.o: type.h
error.o: LLlex.h
error.o: debug.h
error.o: debugcst.h
error.o: errout.h
error.o: f_info.h
error.o: input.h
error.o: inputtype.h
error.o: main.h
error.o: node.h
idf.o: idf.h
input.o: f_info.h
input.o: idf.h
input.o: input.h
input.o: inputtype.h
label.o: LLlex.h
label.o: def.h
label.o: idf.h
label.o: main.h
1989-05-03 10:30:22 +00:00
label.o: nocross.h
1988-10-26 15:21:11 +00:00
label.o: node.h
label.o: scope.h
1989-05-03 10:30:22 +00:00
label.o: target_sizes.h
1988-10-26 15:21:11 +00:00
label.o: type.h
lookup.o: LLlex.h
lookup.o: def.h
lookup.o: idf.h
lookup.o: misc.h
1989-05-03 10:30:22 +00:00
lookup.o: nocross.h
1988-10-26 15:21:11 +00:00
lookup.o: node.h
lookup.o: scope.h
1989-05-03 10:30:22 +00:00
lookup.o: target_sizes.h
1988-10-26 15:21:11 +00:00
lookup.o: type.h
main.o: LLlex.h
main.o: Lpars.h
1989-05-03 10:30:22 +00:00
main.o: class.h
1988-10-26 15:21:11 +00:00
main.o: const.h
main.o: debug.h
main.o: debugcst.h
main.o: def.h
main.o: f_info.h
main.o: idf.h
main.o: input.h
main.o: inputtype.h
main.o: main.h
1989-05-03 10:30:22 +00:00
main.o: nocross.h
1988-10-26 15:21:11 +00:00
main.o: node.h
main.o: required.h
1990-12-11 14:09:02 +00:00
main.o: scope.h
1989-05-03 10:30:22 +00:00
main.o: target_sizes.h
1988-10-26 15:21:11 +00:00
main.o: tokenname.h
main.o: type.h
misc.o: LLlex.h
misc.o: f_info.h
misc.o: idf.h
misc.o: main.h
misc.o: misc.h
misc.o: node.h
node.o: LLlex.h
node.o: debug.h
node.o: debugcst.h
1989-05-03 10:30:22 +00:00
node.o: nocross.h
1988-10-26 15:21:11 +00:00
node.o: node.h
1989-05-03 10:30:22 +00:00
node.o: target_sizes.h
1988-10-26 15:21:11 +00:00
node.o: type.h
options.o: class.h
options.o: const.h
options.o: idfsize.h
options.o: main.h
1989-05-03 10:30:22 +00:00
options.o: nocross.h
options.o: target_sizes.h
1988-10-26 15:21:11 +00:00
options.o: type.h
readwrite.o: LLlex.h
readwrite.o: debug.h
readwrite.o: debugcst.h
readwrite.o: def.h
1989-05-03 10:30:22 +00:00
readwrite.o: idf.h
1988-10-26 15:21:11 +00:00
readwrite.o: main.h
1989-05-03 10:30:22 +00:00
readwrite.o: misc.h
readwrite.o: nocross.h
1988-10-26 15:21:11 +00:00
readwrite.o: node.h
readwrite.o: scope.h
1989-05-03 10:30:22 +00:00
readwrite.o: target_sizes.h
1988-10-26 15:21:11 +00:00
readwrite.o: type.h
scope.o: LLlex.h
scope.o: debug.h
scope.o: debugcst.h
scope.o: def.h
scope.o: idf.h
scope.o: misc.h
1989-05-03 10:30:22 +00:00
scope.o: nocross.h
1988-10-26 15:21:11 +00:00
scope.o: node.h
scope.o: scope.h
1989-05-03 10:30:22 +00:00
scope.o: target_sizes.h
1988-10-26 15:21:11 +00:00
scope.o: type.h
symbol2str.o: Lpars.h
tokenname.o: Lpars.h
tokenname.o: idf.h
tokenname.o: tokenname.h
type.o: LLlex.h
type.o: const.h
type.o: debug.h
type.o: debugcst.h
type.o: def.h
type.o: idf.h
type.o: main.h
1989-05-03 10:30:22 +00:00
type.o: nocross.h
1988-10-26 15:21:11 +00:00
type.o: node.h
type.o: scope.h
type.o: target_sizes.h
type.o: type.h
typequiv.o: LLlex.h
typequiv.o: debug.h
typequiv.o: debugcst.h
typequiv.o: def.h
1989-05-03 10:30:22 +00:00
typequiv.o: nocross.h
1988-10-26 15:21:11 +00:00
typequiv.o: node.h
1989-05-03 10:30:22 +00:00
typequiv.o: target_sizes.h
1988-10-26 15:21:11 +00:00
typequiv.o: type.h
progs.o: LLlex.h
progs.o: debug.h
progs.o: debugcst.h
progs.o: def.h
progs.o: main.h
1989-05-03 10:30:22 +00:00
progs.o: nocross.h
1988-10-26 15:21:11 +00:00
progs.o: scope.h
1989-05-03 10:30:22 +00:00
progs.o: target_sizes.h
1988-10-26 15:21:11 +00:00
progs.o: type.h
1990-12-11 14:09:02 +00:00
stab.o: LLlex.h
stab.o: const.h
stab.o: def.h
stab.o: idf.h
stab.o: main.h
stab.o: nocross.h
stab.o: node.h
stab.o: scope.h
stab.o: target_sizes.h
stab.o: type.h
1988-10-26 15:21:11 +00:00
declar.o: LLlex.h
declar.o: Lpars.h
declar.o: chk_expr.h
1989-05-03 10:30:22 +00:00
declar.o: debug.h
declar.o: debugcst.h
1988-10-26 15:21:11 +00:00
declar.o: def.h
declar.o: idf.h
declar.o: main.h
declar.o: misc.h
1989-05-03 10:30:22 +00:00
declar.o: nocross.h
1988-10-26 15:21:11 +00:00
declar.o: node.h
declar.o: scope.h
1989-05-03 10:30:22 +00:00
declar.o: target_sizes.h
1988-10-26 15:21:11 +00:00
declar.o: type.h
expression.o: LLlex.h
expression.o: Lpars.h
expression.o: chk_expr.h
expression.o: debug.h
expression.o: debugcst.h
expression.o: def.h
1989-05-03 10:30:22 +00:00
expression.o: idf.h
1988-10-26 15:21:11 +00:00
expression.o: main.h
1989-05-03 10:30:22 +00:00
expression.o: misc.h
expression.o: nocross.h
1988-10-26 15:21:11 +00:00
expression.o: node.h
expression.o: scope.h
1989-05-03 10:30:22 +00:00
expression.o: target_sizes.h
1988-10-26 15:21:11 +00:00
expression.o: type.h
program.o: LLlex.h
program.o: Lpars.h
program.o: def.h
1989-05-03 10:30:22 +00:00
program.o: f_info.h
program.o: idf.h
1988-10-26 15:21:11 +00:00
program.o: main.h
program.o: node.h
program.o: scope.h
statement.o: LLlex.h
statement.o: Lpars.h
statement.o: chk_expr.h
statement.o: def.h
statement.o: desig.h
1989-05-03 10:30:22 +00:00
statement.o: f_info.h
1988-10-26 15:21:11 +00:00
statement.o: idf.h
statement.o: main.h
1989-05-03 10:30:22 +00:00
statement.o: misc.h
statement.o: nocross.h
1988-10-26 15:21:11 +00:00
statement.o: node.h
statement.o: scope.h
1989-05-03 10:30:22 +00:00
statement.o: target_sizes.h
1988-10-26 15:21:11 +00:00
statement.o: type.h
tokenfile.o: Lpars.h
1989-05-03 10:30:22 +00:00
Lpars.o: Lpars.h
symbol2str.o: Lpars.h
casestat.o: LLlex.h
casestat.o: Lpars.h
casestat.o: chk_expr.h
casestat.o: debug.h
casestat.o: debugcst.h
casestat.o: density.h
casestat.o: main.h
casestat.o: nocross.h
casestat.o: node.h
casestat.o: target_sizes.h
casestat.o: type.h
tmpvar.o: debug.h
tmpvar.o: debugcst.h
tmpvar.o: def.h
tmpvar.o: main.h
tmpvar.o: nocross.h
tmpvar.o: scope.h
tmpvar.o: target_sizes.h
tmpvar.o: type.h
char.o: class.h
next.o: debug.h
next.o: debugcst.h