1986-03-20 14:52:03 +00:00
|
|
|
# make modula-2 "compiler"
|
1986-10-22 15:38:24 +00:00
|
|
|
EMDIR = ../../..
|
1986-07-08 14:59:02 +00:00
|
|
|
MHDIR = $(EMDIR)/modules/h
|
|
|
|
PKGDIR = $(EMDIR)/modules/pkg
|
|
|
|
LIBDIR = $(EMDIR)/modules/lib
|
1986-08-26 14:33:24 +00:00
|
|
|
LLGEN = $(EMDIR)/bin/LLgen
|
1986-03-20 14:52:03 +00:00
|
|
|
|
1986-07-08 14:59:02 +00:00
|
|
|
INCLUDES = -I$(MHDIR) -I$(EMDIR)/h -I$(PKGDIR)
|
1986-04-03 17:41:26 +00:00
|
|
|
|
1986-10-06 20:36:30 +00:00
|
|
|
GFILES = tokenfile.g program.g declar.g expression.g statement.g
|
1986-03-20 14:52:03 +00:00
|
|
|
CC = cc
|
1986-08-26 14:33:24 +00:00
|
|
|
LLGENOPTIONS =
|
1986-09-25 19:39:06 +00:00
|
|
|
PROFILE =
|
1986-06-17 12:04:05 +00:00
|
|
|
CFLAGS = $(PROFILE) $(INCLUDES) -DSTATIC=
|
|
|
|
LINTFLAGS = -DSTATIC= -DNORCSID
|
1986-04-03 17:41:26 +00:00
|
|
|
LFLAGS = $(PROFILE)
|
1986-10-06 20:36:30 +00:00
|
|
|
LSRC = tokenfile.c program.c declar.c expression.c statement.c
|
1986-03-20 14:52:03 +00:00
|
|
|
LOBJ = tokenfile.o program.o declar.o expression.o statement.o
|
1986-10-06 20:36:30 +00:00
|
|
|
CSRC = LLlex.c LLmessage.c char.c error.c main.c \
|
|
|
|
symbol2str.c tokenname.c idf.c input.c type.c def.c \
|
|
|
|
scope.c misc.c enter.c defmodule.c typequiv.c node.c \
|
|
|
|
cstoper.c chk_expr.c options.c walk.c casestat.c desig.c \
|
|
|
|
code.c tmpvar.c lookup.c Version.c
|
1986-03-20 14:52:03 +00:00
|
|
|
COBJ = LLlex.o LLmessage.o char.o error.o main.o \
|
1986-03-26 15:11:02 +00:00
|
|
|
symbol2str.o tokenname.o idf.o input.o type.o def.o \
|
1986-04-07 17:40:38 +00:00
|
|
|
scope.o misc.o enter.o defmodule.o typequiv.o node.o \
|
1986-05-23 09:46:31 +00:00
|
|
|
cstoper.o chk_expr.o options.o walk.o casestat.o desig.o \
|
1986-10-06 20:36:30 +00:00
|
|
|
code.o tmpvar.o lookup.o Version.o
|
|
|
|
SRC = $(CSRC) $(LSRC) Lpars.c
|
1986-03-20 14:52:03 +00:00
|
|
|
OBJ = $(COBJ) $(LOBJ) Lpars.o
|
|
|
|
|
1986-08-26 14:33:24 +00:00
|
|
|
# Keep the next entries up to date!
|
1986-06-20 14:36:49 +00:00
|
|
|
GENCFILES= tokenfile.c \
|
|
|
|
program.c declar.c expression.c statement.c \
|
|
|
|
symbol2str.c char.c Lpars.c casestat.c tmpvar.c scope.c
|
|
|
|
GENGFILES= tokenfile.g
|
|
|
|
GENHFILES= errout.h\
|
|
|
|
idfsize.h numsize.h strsize.h target_sizes.h debug.h\
|
1986-07-08 14:59:02 +00:00
|
|
|
inputtype.h maxset.h ndir.h density.h\
|
|
|
|
def.h type.h Lpars.h node.h
|
1986-08-26 14:33:24 +00:00
|
|
|
HFILES= LLlex.h\
|
|
|
|
chk_expr.h class.h const.h desig.h f_info.h idf.h\
|
|
|
|
input.h main.h misc.h scope.h standards.h tokenname.h\
|
|
|
|
walk.h $(GENHFILES)
|
1986-06-20 14:36:49 +00:00
|
|
|
#
|
|
|
|
GENFILES = $(GENGFILES) $(GENCFILES) $(GENHFILES)
|
1986-08-26 14:33:24 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
#EXCLEXCLEXCLEXCL
|
|
|
|
|
1986-08-26 14:33:24 +00:00
|
|
|
all: Cfiles
|
1986-10-22 15:38:24 +00:00
|
|
|
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make ../comp/main ; else sh Resolve ../comp/main ; fi'
|
1986-08-26 14:33:24 +00:00
|
|
|
@rm -f nmclash.o a.out
|
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
install: all
|
|
|
|
cp main $(EMDIR)/lib/em_m2
|
|
|
|
|
1986-08-26 14:33:24 +00:00
|
|
|
clean:
|
1986-10-22 15:38:24 +00:00
|
|
|
rm -f $(OBJ) $(GENFILES) LLfiles hfiles Cfiles tab clashes main
|
1986-08-26 14:33:24 +00:00
|
|
|
(cd .. ; rm -rf Xsrc)
|
|
|
|
|
|
|
|
lint: Cfiles
|
1986-10-06 20:36:30 +00:00
|
|
|
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make Xlint ; else sh Resolve Xlint ; fi'
|
1986-08-26 14:33:24 +00:00
|
|
|
@rm -f nmclash.o a.out
|
|
|
|
|
1986-10-06 20:36:30 +00:00
|
|
|
clashes: $(SRC) $(HFILES)
|
1986-10-20 17:40:41 +00:00
|
|
|
sh -c 'if test -f clashes ; then cclash -l7 clashes $? > Xclashes ; mv Xclashes clashes ; else cclash -l7 $? > clashes ; fi'
|
1986-08-26 14:33:24 +00:00
|
|
|
|
|
|
|
# entry points not to be used directly
|
|
|
|
|
1986-10-06 20:36:30 +00:00
|
|
|
Cfiles: hfiles LLfiles $(GENCFILES) $(GENHFILES)
|
|
|
|
echo $(SRC) $(HFILES) > Cfiles
|
1986-03-20 14:52:03 +00:00
|
|
|
|
1986-10-06 20:36:30 +00:00
|
|
|
LLfiles: $(GFILES)
|
|
|
|
$(LLGEN) $(LLGENOPTIONS) $(GFILES)
|
1986-03-20 14:52:03 +00:00
|
|
|
@touch LLfiles
|
|
|
|
|
1986-04-17 09:28:09 +00:00
|
|
|
hfiles: Parameters make.hfiles
|
|
|
|
make.hfiles Parameters
|
|
|
|
touch hfiles
|
|
|
|
|
1986-03-20 14:52:03 +00:00
|
|
|
tokenfile.g: tokenname.c make.tokfile
|
|
|
|
make.tokfile <tokenname.c >tokenfile.g
|
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
symbol2str.c: tokenname.c make.tokcase
|
|
|
|
make.tokcase <tokenname.c >symbol2str.c
|
1986-08-26 14:33:24 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
def.h: def.H make.allocd
|
|
|
|
make.allocd < def.H > def.h
|
1986-08-26 14:33:24 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
type.h: type.H make.allocd
|
|
|
|
make.allocd < type.H > type.h
|
1986-03-20 14:52:03 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
node.h: node.H make.allocd
|
|
|
|
make.allocd < node.H > node.h
|
1986-03-20 14:52:03 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
scope.c: scope.C make.allocd
|
|
|
|
make.allocd < scope.C > scope.c
|
1986-03-20 14:52:03 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
tmpvar.c: tmpvar.C make.allocd
|
|
|
|
make.allocd < tmpvar.C > tmpvar.c
|
1986-03-20 14:52:03 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
casestat.c: casestat.C make.allocd
|
|
|
|
make.allocd < casestat.C > casestat.c
|
1986-08-26 14:33:24 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
char.c: char.tab tab
|
|
|
|
tab -fchar.tab >char.c
|
1986-08-26 14:33:24 +00:00
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
tab:
|
|
|
|
$(CC) tab.c -o tab
|
1986-08-26 14:33:24 +00:00
|
|
|
|
1986-10-20 17:40:41 +00:00
|
|
|
depend:
|
1986-03-20 14:52:03 +00:00
|
|
|
sed '/^#AUTOAUTO/,$$d' Makefile > Makefile.new
|
|
|
|
echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >> Makefile.new
|
1986-10-20 17:40:41 +00:00
|
|
|
mkdep $(SRC) |\
|
1986-03-20 14:52:03 +00:00
|
|
|
sed 's/\.c:/\.o:/' >> Makefile.new
|
|
|
|
mv Makefile Makefile.old
|
|
|
|
mv Makefile.new Makefile
|
|
|
|
|
1986-10-22 15:38:24 +00:00
|
|
|
#INCLINCLINCLINCL
|
|
|
|
|
|
|
|
Xlint:
|
|
|
|
lint $(INCLUDES) $(LINTFLAGS) $(SRC)
|
|
|
|
|
|
|
|
../comp/main: $(OBJ) ../comp/Makefile
|
|
|
|
$(CC) $(LFLAGS) $(OBJ) $(LIBDIR)/libem_mes.a $(LIBDIR)/libemk.a $(LIBDIR)/input.a $(LIBDIR)/assert.a $(LIBDIR)/alloc.a $(LIBDIR)/malloc.o $(LIBDIR)/libprint.a $(LIBDIR)/libstr.a $(LIBDIR)/libsystem.a -o ../comp/main
|
|
|
|
size ../comp/main
|
|
|
|
|
1986-03-20 14:52:03 +00:00
|
|
|
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
|
1986-05-14 09:03:51 +00:00
|
|
|
LLlex.o: LLlex.h Lpars.h class.h const.h debug.h f_info.h idf.h idfsize.h input.h inputtype.h numsize.h strsize.h type.h
|
1986-03-26 15:11:02 +00:00
|
|
|
LLmessage.o: LLlex.h Lpars.h idf.h
|
1986-03-20 14:52:03 +00:00
|
|
|
char.o: class.h
|
1986-04-21 17:27:06 +00:00
|
|
|
error.o: LLlex.h debug.h errout.h f_info.h input.h inputtype.h main.h node.h
|
1986-05-14 09:03:51 +00:00
|
|
|
main.o: LLlex.h Lpars.h debug.h def.h f_info.h idf.h input.h inputtype.h ndir.h node.h scope.h standards.h tokenname.h type.h
|
1986-03-20 14:52:03 +00:00
|
|
|
symbol2str.o: Lpars.h
|
|
|
|
tokenname.o: Lpars.h idf.h tokenname.h
|
|
|
|
idf.o: idf.h
|
1986-10-06 20:36:30 +00:00
|
|
|
input.o: def.h f_info.h idf.h input.h inputtype.h scope.h
|
1986-06-26 09:39:36 +00:00
|
|
|
type.o: LLlex.h const.h debug.h def.h idf.h maxset.h node.h scope.h target_sizes.h type.h walk.h
|
1986-05-28 18:36:51 +00:00
|
|
|
def.o: LLlex.h Lpars.h debug.h def.h idf.h main.h node.h scope.h type.h
|
1986-04-08 18:15:46 +00:00
|
|
|
scope.o: LLlex.h debug.h def.h idf.h node.h scope.h type.h
|
|
|
|
misc.o: LLlex.h f_info.h idf.h misc.h node.h
|
1986-05-14 09:03:51 +00:00
|
|
|
enter.o: LLlex.h debug.h def.h idf.h main.h node.h scope.h type.h
|
1986-10-06 20:36:30 +00:00
|
|
|
defmodule.o: LLlex.h Lpars.h debug.h def.h f_info.h idf.h input.h inputtype.h main.h node.h scope.h
|
1986-06-26 09:39:36 +00:00
|
|
|
typequiv.o: LLlex.h debug.h def.h node.h type.h
|
1986-04-08 18:15:46 +00:00
|
|
|
node.o: LLlex.h debug.h def.h node.h type.h
|
1986-05-14 09:03:51 +00:00
|
|
|
cstoper.o: LLlex.h Lpars.h debug.h idf.h node.h standards.h target_sizes.h type.h
|
1986-10-22 15:38:24 +00:00
|
|
|
chk_expr.o: LLlex.h Lpars.h chk_expr.h const.h debug.h def.h idf.h misc.h node.h scope.h standards.h type.h
|
1986-04-25 10:14:08 +00:00
|
|
|
options.o: idfsize.h main.h ndir.h type.h
|
1986-06-20 14:36:49 +00:00
|
|
|
walk.o: LLlex.h Lpars.h chk_expr.h debug.h def.h desig.h f_info.h idf.h main.h node.h scope.h type.h walk.h
|
1986-06-26 09:39:36 +00:00
|
|
|
casestat.o: LLlex.h Lpars.h debug.h density.h desig.h node.h type.h walk.h
|
1986-05-23 09:46:31 +00:00
|
|
|
desig.o: LLlex.h debug.h def.h desig.h node.h scope.h type.h
|
1986-06-26 09:39:36 +00:00
|
|
|
code.o: LLlex.h Lpars.h debug.h def.h desig.h node.h scope.h standards.h type.h walk.h
|
|
|
|
tmpvar.o: debug.h def.h main.h scope.h type.h
|
1986-10-22 15:38:24 +00:00
|
|
|
lookup.o: LLlex.h debug.h def.h idf.h misc.h node.h scope.h type.h
|
1986-03-20 14:52:03 +00:00
|
|
|
tokenfile.o: Lpars.h
|
1986-08-26 14:33:24 +00:00
|
|
|
program.o: LLlex.h Lpars.h debug.h def.h f_info.h idf.h main.h node.h scope.h type.h
|
1986-06-26 09:39:36 +00:00
|
|
|
declar.o: LLlex.h Lpars.h chk_expr.h debug.h def.h idf.h main.h misc.h node.h scope.h type.h
|
1986-06-17 12:04:05 +00:00
|
|
|
expression.o: LLlex.h Lpars.h chk_expr.h const.h debug.h def.h idf.h node.h type.h
|
1986-04-22 22:36:16 +00:00
|
|
|
statement.o: LLlex.h Lpars.h def.h idf.h node.h scope.h type.h
|
1986-03-20 14:52:03 +00:00
|
|
|
Lpars.o: Lpars.h
|