ack/lang/cem/cpp.ansi/Makefile

265 lines
5.7 KiB
Makefile
Raw Normal View History

1989-10-23 10:35:56 +00:00
# MAKEFILE FOR (STAND_ALONE) CEM PREPROCESSOR
EMHOME=../../..
MODULES=$(EMHOME)/modules
MODULESLIB=$(MODULES)/lib
BIN=$(EMHOME)/lib
MANDIR=$(EMHOME)/man
# Some paths
# Libraries
SYSLIB = $(MODULESLIB)/libsystem.a
STRLIB = $(MODULESLIB)/libstring.a
PRTLIB = $(MODULESLIB)/libprint.a
ALLOCLIB = $(MODULESLIB)/liballoc.a
ASSERTLIB = $(MODULESLIB)/libassert.a
MALLOC = $(MODULESLIB)/malloc.o
LIBS = $(PRTLIB) $(STRLIB) $(ALLOCLIB) $(MALLOC) $(ASSERTLIB) $(SYSLIB)
LIB_INCLUDES = -I$(MODULES)/h -I$(MODULES)/pkg
# Where to install the preprocessor
1989-12-19 11:12:17 +00:00
CEMPP = $(BIN)/cpp.ansi
1989-10-23 10:35:56 +00:00
TABGEN = $(EMHOME)/bin/tabgen
# What C compiler to use and how
1989-12-18 16:41:55 +00:00
CC = cc
COPTIONS = -O
1989-10-23 10:35:56 +00:00
LDFLAGS = -i
# What parser generator to use and how
GEN = $(EMHOME)/bin/LLgen
GENOPTIONS =
# Special #defines during compilation
CDEFS = $(LIB_INCLUDES)
CFLAGS = $(CDEFS) $(COPTIONS) -O# # we cannot pass the COPTIONS to lint!
# Grammar files and their objects
LSRC = tokenfile.g expression.g
LCSRC = tokenfile.c expression.c Lpars.c
LOBJ = tokenfile.o expression.o Lpars.o
# Objects of hand-written C files
1989-10-23 13:00:35 +00:00
CSRC = LLlex.c LLmessage.c ch3bin.c ch3mon.c domacro.c \
1989-10-23 10:35:56 +00:00
error.c idf.c init.c input.c main.c options.c \
preprocess.c replace.c skip.c tokenname.c expr.c
1989-10-23 13:00:35 +00:00
COBJ = LLlex.o LLmessage.o ch3bin.o ch3mon.o domacro.o \
1989-10-23 10:35:56 +00:00
error.o idf.o init.o input.o main.o options.o \
preprocess.o replace.o skip.o tokenname.o next.o expr.o
PRFILES = Makefile Parameters \
make.hfiles make.tokcase make.tokfile LLlex.h bits.h file_info.h \
idf.h input.h interface.h macro.str replace.str \
class.h char.tab expression.g $(CSRC)
# Objects of other generated C files
GOBJ = char.o symbol2str.o
# generated source files
1989-12-19 14:54:40 +00:00
GSRC = char.c symbol2str.c next.c
1989-10-23 10:35:56 +00:00
# .h files generated by `make.allod'
STRSRC = macro.str replace.str
GSTRSRC = macro.h replace.h
# .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
GHSRC = errout.h idfsize.h ifdepth.h macbuf.h \
nparams.h numsize.h obufsize.h \
1989-10-23 10:35:56 +00:00
parbufsize.h pathlength.h strsize.h textsize.h \
1990-03-12 13:28:12 +00:00
botch_free.h debug.h inputtype.h dobits.h ln_prefix.h
1989-10-23 10:35:56 +00:00
# Other generated files, for 'make clean' only
GENERATED = tokenfile.g Lpars.h LLfiles LL.output lint.out \
1989-12-19 14:54:40 +00:00
Xref hfiles cfiles tags Makefile.old
1989-10-23 10:35:56 +00:00
all: cc
1989-12-19 13:55:08 +00:00
cc: cfiles
make "EMHOME="$(EMHOME) "CC=$(CC)" ncpp
1989-10-23 10:35:56 +00:00
hfiles: Parameters char.c
./make.hfiles Parameters
@touch hfiles
.SUFFIXES: .str .h
.str.h:
./make.allocd <$*.str >$*.h
char.c: char.tab
$(TABGEN) -fchar.tab > char.c
next.c: make.next $(STRSRC)
./make.next $(STRSRC) >next.c
macro.h: make.allocd
1989-12-19 13:55:08 +00:00
replace.h: make.allocd
1989-10-23 10:35:56 +00:00
LLfiles: $(LSRC)
$(GEN) $(GENOPTIONS) $(LSRC)
@touch LLfiles
tokenfile.g: tokenname.c make.tokfile
<tokenname.c ./make.tokfile >tokenfile.g
symbol2str.c: tokenname.c make.tokcase
<tokenname.c ./make.tokcase >symbol2str.c
# Objects needed for 'ncpp'
OBJ = $(COBJ) $(LOBJ) $(GOBJ)
SRC = $(CSRC) $(LCSRC) $(GSRC)
ncpp: $(OBJ) Makefile
$(CC) $(COPTIONS) $(LDFLAGS) $(OBJ) $(LIBS) -o ncpp
-size ncpp
cfiles: hfiles LLfiles $(GSRC) $(GSTRSRC)
@touch cfiles
install: all
rm -f $(CEMPP)
cp ncpp $(CEMPP)
1989-12-19 11:12:17 +00:00
rm -f $(MANDIR)/cpp.ansi.6
cp ncpp.6 $(MANDIR)/cpp.ansi.6
1989-10-23 10:35:56 +00:00
cmp: all
-cmp ncpp $(CEMPP)
1989-12-19 11:12:17 +00:00
-cmp ncpp.6 $(MANDIR)/cpp.ansi.6
1989-10-23 10:35:56 +00:00
pr:
@pr $(PRFILES)
opr:
make pr | opr
tags: cfiles
ctags $(SRC)
depend: cfiles
sed '/^#AUTOAUTO/,$$d' Makefile >Makefile.new
echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >>Makefile.new
$(EMHOME)/bin/mkdep $(SRC) | \
sed 's/\.c:/.o:/' >>Makefile.new
mv Makefile Makefile.old
mv Makefile.new Makefile
xref:
ctags -x `grep "\.[ch]" Files`|sed "s/).*/)/">Xref
lint: cfiles
lint -bx $(CDEFS) $(SRC) >lint.out
clean:
rm -f $(LCSRC) $(OBJ) $(GENERATED) $(GSRC) $(GHSRC) $(GSTRSRC) ncpp Out
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
LLlex.o: LLlex.h
LLlex.o: Lpars.h
LLlex.o: arith.h
LLlex.o: bits.h
LLlex.o: class.h
LLlex.o: dobits.h
LLlex.o: file_info.h
LLlex.o: idf.h
LLlex.o: idfsize.h
LLlex.o: input.h
LLlex.o: inputtype.h
LLlex.o: macro.h
LLlex.o: numsize.h
LLlex.o: strsize.h
LLmessage.o: LLlex.h
LLmessage.o: Lpars.h
1989-12-19 13:55:08 +00:00
LLmessage.o: arith.h
1989-10-23 10:35:56 +00:00
LLmessage.o: file_info.h
1989-10-23 13:00:35 +00:00
ch3bin.o: Lpars.h
ch3bin.o: arith.h
ch3mon.o: Lpars.h
ch3mon.o: arith.h
1989-10-23 10:35:56 +00:00
domacro.o: LLlex.h
domacro.o: Lpars.h
domacro.o: arith.h
domacro.o: bits.h
domacro.o: botch_free.h
domacro.o: class.h
domacro.o: dobits.h
domacro.o: file_info.h
domacro.o: idf.h
domacro.o: idfsize.h
domacro.o: ifdepth.h
domacro.o: input.h
domacro.o: inputtype.h
1989-12-19 13:55:08 +00:00
domacro.o: macbuf.h
1989-10-23 10:35:56 +00:00
domacro.o: macro.h
domacro.o: nparams.h
domacro.o: parbufsize.h
1989-12-19 13:55:08 +00:00
domacro.o: replace.h
1989-10-23 10:35:56 +00:00
domacro.o: textsize.h
error.o: LLlex.h
1989-12-19 13:55:08 +00:00
error.o: arith.h
1989-10-23 10:35:56 +00:00
error.o: errout.h
error.o: file_info.h
idf.o: idf.h
init.o: class.h
init.o: idf.h
init.o: macro.h
input.o: file_info.h
input.o: input.h
input.o: inputtype.h
main.o: arith.h
main.o: file_info.h
main.o: idfsize.h
options.o: class.h
options.o: idf.h
options.o: idfsize.h
options.o: macro.h
preprocess.o: LLlex.h
1989-12-19 13:55:08 +00:00
preprocess.o: arith.h
1989-10-23 10:35:56 +00:00
preprocess.o: bits.h
preprocess.o: class.h
preprocess.o: dobits.h
preprocess.o: file_info.h
preprocess.o: idf.h
preprocess.o: idfsize.h
preprocess.o: input.h
preprocess.o: inputtype.h
1990-03-12 13:28:12 +00:00
preprocess.o: ln_prefix.h
1989-10-23 10:35:56 +00:00
preprocess.o: macro.h
preprocess.o: obufsize.h
1990-03-12 13:28:12 +00:00
preprocess.o: textsize.h
1989-10-23 10:35:56 +00:00
replace.o: LLlex.h
1989-12-19 13:55:08 +00:00
replace.o: arith.h
1989-10-23 10:35:56 +00:00
replace.o: class.h
replace.o: file_info.h
replace.o: idf.h
replace.o: idfsize.h
replace.o: input.h
replace.o: inputtype.h
replace.o: macbuf.h
1989-10-23 10:35:56 +00:00
replace.o: macro.h
replace.o: nparams.h
replace.o: numsize.h
replace.o: pathlength.h
replace.o: replace.h
replace.o: strsize.h
skip.o: LLlex.h
1989-12-19 13:55:08 +00:00
skip.o: arith.h
1989-10-23 10:35:56 +00:00
skip.o: class.h
skip.o: file_info.h
skip.o: input.h
skip.o: inputtype.h
tokenname.o: LLlex.h
tokenname.o: Lpars.h
1989-12-19 13:55:08 +00:00
tokenname.o: arith.h
1989-10-23 10:35:56 +00:00
tokenname.o: file_info.h
tokenname.o: idf.h
expr.o: Lpars.h
tokenfile.o: Lpars.h
expression.o: LLlex.h
expression.o: Lpars.h
expression.o: arith.h
expression.o: file_info.h
Lpars.o: Lpars.h
char.o: class.h
symbol2str.o: Lpars.h