ack/lang/m2/comp/Makefile

398 lines
8.5 KiB
Makefile
Raw Normal View History

1986-03-20 14:52:03 +00:00
# make modula-2 "compiler"
EMHOME = ../../..
MHDIR = $(EMHOME)/modules/h
PKGDIR = $(EMHOME)/modules/pkg
LIBDIR = $(EMHOME)/modules/lib
1986-11-05 14:33:00 +00:00
OBJECTCODE = $(LIBDIR)/libemk.a
LLGEN = $(EMHOME)/bin/LLgen
MKDEP = $(EMHOME)/bin/mkdep
PRID = $(EMHOME)/bin/prid
CID = $(EMHOME)/bin/cid
1986-11-26 16:40:45 +00:00
CURRDIR = .
1986-03-20 14:52:03 +00:00
INCLUDES = -I$(MHDIR) -I$(EMHOME)/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
LLGENOPTIONS = -v
1986-09-25 19:39:06 +00:00
PROFILE =
CFLAGS = $(PROFILE) $(INCLUDES) -O -DSTATIC=
1986-06-17 12:04:05 +00:00
LINTFLAGS = -DSTATIC= -DNORCSID
MALLOC = $(LIBDIR)/malloc.o
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 \
1986-12-09 17:41:06 +00:00
code.c tmpvar.c lookup.c Version.c next.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-12-09 17:41:06 +00:00
code.o tmpvar.o lookup.o Version.o next.o
1986-10-06 20:36:30 +00:00
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 \
1986-12-09 17:41:06 +00:00
symbol2str.c char.c Lpars.c casestat.c tmpvar.c scope.c next.c
1986-06-20 14:36:49 +00:00
GENGFILES= tokenfile.g
GENHFILES= errout.h\
1986-11-05 14:33:00 +00:00
idfsize.h numsize.h strsize.h target_sizes.h \
inputtype.h maxset.h density.h\
1986-11-05 14:33:00 +00:00
def.h debugcst.h type.h Lpars.h node.h
1986-08-26 14:33:24 +00:00
HFILES= LLlex.h\
1986-11-05 14:33:00 +00:00
chk_expr.h class.h const.h debug.h desig.h f_info.h idf.h\
1986-08-26 14:33:24 +00:00
input.h main.h misc.h scope.h standards.h tokenname.h\
1986-11-05 14:33:00 +00:00
walk.h warning.h $(GENHFILES)
1986-06-20 14:36:49 +00:00
#
GENFILES = $(GENGFILES) $(GENCFILES) $(GENHFILES)
1986-12-09 17:41:06 +00:00
NEXTFILES = def.H type.H node.H scope.C tmpvar.C casestat.C
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-11-26 16:40:45 +00:00
sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make $(CURRDIR)/main ; else sh Resolve 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 $(CURRDIR)/main $(EMHOME)/lib/em_m2
1986-10-22 15:38:24 +00:00
1986-08-26 14:33:24 +00:00
clean:
rm -f $(OBJ) $(GENFILES) LLfiles hfiles Cfiles tab clashes \
$(CURRDIR)/main LL.output
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
longnames: $(SRC) $(HFILES)
sh -c 'if test -f longnames ; then $(PRID) -l7 longnames $? > Xlongnames ; mv Xlongnames longnames ; else $(PRID) -l7 $? > longnames ; fi'
1986-08-26 14:33:24 +00:00
# entry points not to be used directly
1986-11-05 14:33:00 +00:00
Cfiles: hfiles LLfiles $(GENCFILES) $(GENHFILES) Makefile
1986-10-06 20:36:30 +00:00
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-12-09 17:41:06 +00:00
.SUFFIXES: .H .h
.H.h:
./make.allocd < $*.H > $*.h
1986-08-26 14:33:24 +00:00
1986-12-09 17:41:06 +00:00
.SUFFIXES: .C .c
.C.c:
./make.allocd < $*.C > $*.c
1986-03-20 14:52:03 +00:00
1986-12-09 17:41:06 +00:00
def.h: make.allocd
type.h: make.allocd
node.h: make.allocd
scope.c: make.allocd
tmpvar.c: make.allocd
casestat.c: make.allocd
1986-03-20 14:52:03 +00:00
1986-12-09 17:41:06 +00:00
next.c: $(NEXTFILES) ./make.next
./make.next $(NEXTFILES) > next.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
$(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)
1986-11-26 16:40:45 +00:00
$(CURRDIR)/main: $(OBJ)
$(CC) $(LFLAGS) $(OBJ) $(LIBDIR)/libem_mes.a $(OBJECTCODE) $(LIBDIR)/libinput.a $(LIBDIR)/libassert.a $(LIBDIR)/liballoc.a $(MALLOC) $(LIBDIR)/libprint.a $(LIBDIR)/libstring.a $(LIBDIR)/libsystem.a -o $(CURRDIR)/main
size $(CURRDIR)/main
1986-10-22 15:38:24 +00:00
1986-03-20 14:52:03 +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: numsize.h
LLlex.o: strsize.h
LLlex.o: type.h
LLlex.o: warning.h
LLmessage.o: LLlex.h
LLmessage.o: Lpars.h
LLmessage.o: idf.h
1986-03-20 14:52:03 +00:00
char.o: class.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
error.o: warning.h
main.o: LLlex.h
main.o: Lpars.h
main.o: SYSTEM.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: node.h
main.o: scope.h
main.o: standards.h
main.o: tokenname.h
main.o: type.h
main.o: warning.h
1986-03-20 14:52:03 +00:00
symbol2str.o: Lpars.h
tokenname.o: Lpars.h
tokenname.o: idf.h
tokenname.o: tokenname.h
1986-03-20 14:52:03 +00:00
idf.o: idf.h
input.o: def.h
input.o: f_info.h
input.o: idf.h
input.o: input.h
input.o: inputtype.h
input.o: scope.h
type.o: LLlex.h
type.o: chk_expr.h
type.o: const.h
type.o: debug.h
type.o: debugcst.h
type.o: def.h
type.o: idf.h
type.o: maxset.h
type.o: node.h
type.o: scope.h
type.o: target_sizes.h
type.o: type.h
type.o: walk.h
def.o: LLlex.h
def.o: Lpars.h
def.o: debug.h
def.o: debugcst.h
def.o: def.h
def.o: idf.h
def.o: main.h
def.o: node.h
def.o: scope.h
def.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: node.h
scope.o: scope.h
scope.o: type.h
misc.o: LLlex.h
misc.o: f_info.h
misc.o: idf.h
misc.o: misc.h
misc.o: node.h
enter.o: LLlex.h
enter.o: debug.h
enter.o: debugcst.h
enter.o: def.h
enter.o: idf.h
enter.o: main.h
enter.o: misc.h
enter.o: node.h
enter.o: scope.h
enter.o: type.h
defmodule.o: LLlex.h
defmodule.o: Lpars.h
defmodule.o: debug.h
defmodule.o: debugcst.h
defmodule.o: def.h
defmodule.o: f_info.h
defmodule.o: idf.h
defmodule.o: input.h
defmodule.o: inputtype.h
defmodule.o: main.h
defmodule.o: misc.h
defmodule.o: node.h
defmodule.o: scope.h
defmodule.o: type.h
typequiv.o: LLlex.h
typequiv.o: debug.h
typequiv.o: debugcst.h
typequiv.o: def.h
typequiv.o: node.h
typequiv.o: type.h
typequiv.o: warning.h
node.o: LLlex.h
node.o: debug.h
node.o: debugcst.h
node.o: def.h
node.o: node.h
node.o: type.h
cstoper.o: LLlex.h
cstoper.o: Lpars.h
cstoper.o: debug.h
cstoper.o: debugcst.h
cstoper.o: idf.h
cstoper.o: node.h
cstoper.o: standards.h
cstoper.o: target_sizes.h
cstoper.o: type.h
cstoper.o: warning.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: misc.h
chk_expr.o: node.h
chk_expr.o: scope.h
chk_expr.o: standards.h
chk_expr.o: type.h
chk_expr.o: warning.h
options.o: idfsize.h
options.o: main.h
options.o: type.h
options.o: warning.h
walk.o: LLlex.h
walk.o: Lpars.h
walk.o: chk_expr.h
walk.o: debug.h
walk.o: debugcst.h
walk.o: def.h
walk.o: desig.h
walk.o: f_info.h
walk.o: idf.h
walk.o: main.h
walk.o: node.h
walk.o: scope.h
walk.o: type.h
walk.o: walk.h
walk.o: warning.h
casestat.o: LLlex.h
casestat.o: Lpars.h
casestat.o: debug.h
casestat.o: debugcst.h
casestat.o: density.h
casestat.o: desig.h
casestat.o: node.h
casestat.o: type.h
casestat.o: walk.h
desig.o: LLlex.h
desig.o: debug.h
desig.o: debugcst.h
desig.o: def.h
desig.o: desig.h
desig.o: node.h
desig.o: scope.h
desig.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
code.o: node.h
code.o: scope.h
code.o: standards.h
code.o: type.h
code.o: walk.h
tmpvar.o: debug.h
tmpvar.o: debugcst.h
tmpvar.o: def.h
tmpvar.o: main.h
tmpvar.o: scope.h
tmpvar.o: type.h
lookup.o: LLlex.h
lookup.o: debug.h
lookup.o: debugcst.h
lookup.o: def.h
lookup.o: idf.h
lookup.o: misc.h
lookup.o: node.h
lookup.o: scope.h
lookup.o: type.h
next.o: debug.h
next.o: debugcst.h
1986-03-20 14:52:03 +00:00
tokenfile.o: Lpars.h
program.o: LLlex.h
program.o: Lpars.h
program.o: debug.h
program.o: debugcst.h
program.o: def.h
program.o: f_info.h
program.o: idf.h
program.o: main.h
program.o: node.h
program.o: scope.h
program.o: type.h
program.o: warning.h
declar.o: LLlex.h
declar.o: Lpars.h
declar.o: chk_expr.h
declar.o: debug.h
declar.o: debugcst.h
declar.o: def.h
declar.o: idf.h
declar.o: main.h
declar.o: misc.h
declar.o: node.h
declar.o: scope.h
declar.o: type.h
declar.o: warning.h
expression.o: LLlex.h
expression.o: Lpars.h
expression.o: chk_expr.h
expression.o: const.h
expression.o: debug.h
expression.o: debugcst.h
expression.o: def.h
expression.o: idf.h
expression.o: node.h
expression.o: type.h
expression.o: warning.h
statement.o: LLlex.h
statement.o: Lpars.h
statement.o: def.h
statement.o: idf.h
statement.o: node.h
statement.o: scope.h
statement.o: type.h
1986-03-20 14:52:03 +00:00
Lpars.o: Lpars.h