1987-09-24 13:01:27 +00:00
|
|
|
#
|
|
|
|
EMHOME = ../../..
|
|
|
|
MHDIR = $(EMHOME)/modules/h
|
|
|
|
PKGDIR = $(EMHOME)/modules/pkg
|
|
|
|
LIBDIR = $(EMHOME)/modules/lib
|
|
|
|
LLGEN = $(EMHOME)/bin/LLgen
|
|
|
|
MKDEP = $(EMHOME)/bin/mkdep
|
|
|
|
|
|
|
|
INCLUDES = -I$(MHDIR) -I$(PKGDIR) -I$(EMHOME)/h
|
|
|
|
|
|
|
|
GF = program.g declar.g expression.g statement.g
|
|
|
|
GENGFILES= tokenfile.g
|
|
|
|
GFILES =$(GENGFILES) $(GF)
|
1989-05-29 10:27:54 +00:00
|
|
|
LLGENOPTIONS =
|
1987-09-24 13:01:27 +00:00
|
|
|
PROFILE =
|
1989-05-29 10:27:54 +00:00
|
|
|
M2COMPILER = m2
|
1989-10-24 16:54:55 +00:00
|
|
|
DEFDIR = lib/m2
|
|
|
|
HOMEDIR =
|
1991-04-10 13:32:42 +00:00
|
|
|
CFLAGS = -O $(PROFILE) $(INCLUDES) -DM2COMPILER=\"$(M2COMPILER)\" -DDEF_DIR=\"$(DEFDIR)\" $(HOMEDIR)
|
|
|
|
LINTFLAGS = -DNORCSID
|
1987-09-24 13:01:27 +00:00
|
|
|
MALLOC = $(LIBDIR)/malloc.o
|
1991-02-20 09:48:36 +00:00
|
|
|
LDFLAGS = $(PROFILE)
|
1987-09-24 13:01:27 +00:00
|
|
|
LSRC = tokenfile.c program.c declar.c expression.c statement.c
|
|
|
|
LOBJ = tokenfile.o program.o declar.o expression.o statement.o
|
|
|
|
CSRC = LLlex.c LLmessage.c error.c main.c lib.c \
|
1989-05-29 10:27:54 +00:00
|
|
|
tokenname.c idf.c input.c misc.c options.c Version.c
|
1987-09-24 13:01:27 +00:00
|
|
|
COBJ = LLlex.o LLmessage.o error.o main.o lib.o \
|
1989-05-29 10:27:54 +00:00
|
|
|
tokenname.o idf.o input.o misc.o options.o char.o symbol2str.o Version.o
|
1987-09-24 13:01:27 +00:00
|
|
|
GENC= $(LSRC) symbol2str.c char.c Lpars.c
|
|
|
|
SRC = $(CSRC) $(GENC)
|
|
|
|
OBJ = $(COBJ) $(LOBJ) Lpars.o
|
|
|
|
GENH = Lpars.h
|
|
|
|
HSRC = main.h LLlex.h class.h f_info.h idf.h input.h tokenname.h
|
|
|
|
HFILES =$(GENH) $(HSRC)
|
|
|
|
#
|
|
|
|
GENFILES = $(GENGFILES) $(GENC) $(GENH)
|
|
|
|
|
|
|
|
all: Cfiles
|
1989-10-24 16:54:55 +00:00
|
|
|
make "EMHOME="$(EMHOME) "DEFDIR="$(DEFDIR) "HOMEDIR="$(HOMEDIR) "M2COMPILER="$(M2COMPILER) m2mm
|
1987-09-24 13:01:27 +00:00
|
|
|
|
|
|
|
install: all
|
|
|
|
cp m2mm $(EMHOME)/bin
|
1987-09-28 13:45:24 +00:00
|
|
|
cp m2mm.1 $(EMHOME)/man
|
1987-09-24 13:01:27 +00:00
|
|
|
|
|
|
|
cmp: all
|
1987-09-28 13:45:24 +00:00
|
|
|
-cmp m2mm $(EMHOME)/bin/m2mm
|
|
|
|
-cmp m2mm.1 $(EMHOME)/man/m2mm.1
|
1987-09-24 13:01:27 +00:00
|
|
|
|
|
|
|
opr:
|
|
|
|
make "EMHOME="$(EMHOME) pr | opr
|
|
|
|
|
|
|
|
pr:
|
|
|
|
@pr Makefile $(GF) $(HFILES) $(CSRC)
|
|
|
|
|
|
|
|
clean:
|
1989-04-11 11:40:49 +00:00
|
|
|
rm -f $(OBJ) $(GENFILES) LLfiles Cfiles LL.output m2mm
|
1987-09-24 13:01:27 +00:00
|
|
|
|
|
|
|
lint: Cfiles
|
|
|
|
lint $(INCLUDES) $(LINTFLAGS) $(SRC) \
|
|
|
|
$(LIBDIR)/llib-linput.ln \
|
|
|
|
$(LIBDIR)/llib-lalloc.ln \
|
|
|
|
$(LIBDIR)/llib-lprint.ln \
|
|
|
|
$(LIBDIR)/llib-lstring.ln \
|
|
|
|
$(LIBDIR)/llib-lsystem.ln
|
|
|
|
|
|
|
|
# entry points not to be used directly
|
|
|
|
Cfiles: LLfiles $(GENC) $(GENH) Makefile
|
|
|
|
|
|
|
|
LLfiles: $(GFILES)
|
|
|
|
$(LLGEN) $(LLGENOPTIONS) $(GFILES)
|
|
|
|
@touch LLfiles
|
|
|
|
|
|
|
|
tokenfile.g: tokenname.c make.tokfile
|
|
|
|
make.tokfile <tokenname.c >tokenfile.g
|
|
|
|
|
|
|
|
symbol2str.c: tokenname.c make.tokcase
|
|
|
|
make.tokcase <tokenname.c >symbol2str.c
|
|
|
|
|
1989-04-11 11:40:49 +00:00
|
|
|
char.c: char.tab
|
|
|
|
$(EMHOME)/bin/tabgen -fchar.tab >char.c
|
1987-09-24 13:01:27 +00:00
|
|
|
|
|
|
|
depend: Cfiles
|
|
|
|
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
|
|
|
|
|
|
|
|
m2mm: $(OBJ)
|
|
|
|
$(CC) $(LDFLAGS) $(OBJ) $(LIBDIR)/libinput.a $(LIBDIR)/liballoc.a $(MALLOC) $(LIBDIR)/libprint.a $(LIBDIR)/libstring.a $(LIBDIR)/libsystem.a -o m2mm
|
1988-08-24 10:49:24 +00:00
|
|
|
-size m2mm
|
1987-09-24 13:01:27 +00:00
|
|
|
|
|
|
|
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
|
|
|
|
LLlex.o: LLlex.h
|
|
|
|
LLlex.o: Lpars.h
|
|
|
|
LLlex.o: class.h
|
|
|
|
LLlex.o: f_info.h
|
|
|
|
LLlex.o: file_list.h
|
|
|
|
LLlex.o: idf.h
|
|
|
|
LLlex.o: idfsize.h
|
|
|
|
LLlex.o: input.h
|
|
|
|
LLlex.o: inputtype.h
|
|
|
|
LLmessage.o: LLlex.h
|
|
|
|
LLmessage.o: Lpars.h
|
|
|
|
LLmessage.o: file_list.h
|
|
|
|
LLmessage.o: idf.h
|
|
|
|
error.o: LLlex.h
|
|
|
|
error.o: f_info.h
|
|
|
|
error.o: input.h
|
|
|
|
error.o: inputtype.h
|
|
|
|
main.o: LLlex.h
|
|
|
|
main.o: Lpars.h
|
|
|
|
main.o: f_info.h
|
|
|
|
main.o: file_list.h
|
|
|
|
main.o: idf.h
|
|
|
|
main.o: input.h
|
|
|
|
main.o: inputtype.h
|
|
|
|
main.o: tokenname.h
|
|
|
|
tokenname.o: Lpars.h
|
|
|
|
tokenname.o: file_list.h
|
|
|
|
tokenname.o: idf.h
|
|
|
|
tokenname.o: tokenname.h
|
|
|
|
idf.o: file_list.h
|
|
|
|
idf.o: idf.h
|
|
|
|
input.o: f_info.h
|
|
|
|
input.o: input.h
|
|
|
|
input.o: inputtype.h
|
|
|
|
misc.o: LLlex.h
|
|
|
|
misc.o: f_info.h
|
|
|
|
misc.o: file_list.h
|
|
|
|
misc.o: idf.h
|
|
|
|
options.o: main.h
|
|
|
|
tokenfile.o: Lpars.h
|
|
|
|
program.o: LLlex.h
|
|
|
|
program.o: Lpars.h
|
|
|
|
program.o: f_info.h
|
|
|
|
program.o: file_list.h
|
|
|
|
program.o: idf.h
|
|
|
|
program.o: main.h
|
|
|
|
declar.o: Lpars.h
|
|
|
|
expression.o: Lpars.h
|
|
|
|
statement.o: LLlex.h
|
|
|
|
statement.o: Lpars.h
|
|
|
|
statement.o: file_list.h
|
|
|
|
statement.o: idf.h
|
|
|
|
symbol2str.o: Lpars.h
|
|
|
|
char.o: class.h
|
|
|
|
Lpars.o: Lpars.h
|