ack/util/cpp/Makefile

251 lines
5.5 KiB
Makefile
Raw Normal View History

1987-01-06 15:16:53 +00:00
# MAKEFILE FOR (STAND_ALONE) CEM PREPROCESSOR
EMHOME=../..
MODULES=$(EMHOME)/modules
MODULESLIB=$(MODULES)/lib
BIN=$(EMHOME)/lib
1987-02-24 15:36:34 +00:00
MANDIR=$(EMHOME)/man
1987-01-06 15:16:53 +00:00
# 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
CEMPP = $(BIN)/cpp
# What C compiler to use and how
CC = cc
COPTIONS =
1987-03-17 11:02:37 +00:00
LDFLAGS = -i
1987-01-06 15:16:53 +00:00
# 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
CSRC = LLlex.c LLmessage.c ch7bin.c ch7mon.c domacro.c \
1989-05-29 11:17:40 +00:00
error.c idf.c init.c input.c main.c options.c Version.c \
1987-01-06 15:16:53 +00:00
preprocess.c replace.c scan.c skip.c tokenname.c next.c expr.c
COBJ = LLlex.o LLmessage.o ch7bin.o ch7mon.o domacro.o \
1989-05-29 11:17:40 +00:00
error.o idf.o init.o input.o main.o options.o Version.o \
1987-01-06 15:16:53 +00:00
preprocess.o replace.o scan.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.h \
1988-11-16 10:43:15 +00:00
class.h char.tab expression.g $(CSRC)
1987-01-06 15:16:53 +00:00
# Objects of other generated C files
GOBJ = char.o symbol2str.o
# generated source files
GSRC = char.c symbol2str.c
# .h files generated by `make hfiles'; PLEASE KEEP THIS UP-TO-DATE!
GHSRC = errout.h idfsize.h ifdepth.h lapbuf.h \
nparams.h numsize.h obufsize.h \
1987-01-06 15:16:53 +00:00
parbufsize.h pathlength.h strsize.h textsize.h \
1987-04-15 09:30:37 +00:00
botch_free.h debug.h inputtype.h dobits.h line_prefix.h
1987-01-06 15:16:53 +00:00
# Other generated files, for 'make clean' only
GENERATED = tokenfile.g Lpars.h LLfiles LL.output lint.out \
Xref hfiles cfiles charoffset.h
all: cc
cc: hfiles LLfiles
make "EMHOME="$(EMHOME) cpp
1987-01-07 11:10:33 +00:00
hfiles: Parameters char.c charoffset.h
1987-01-06 15:16:53 +00:00
./make.hfiles Parameters
@touch hfiles
1988-11-16 10:43:15 +00:00
charoffset.h char.c: char.tab
$(EMHOME)/bin/tabgen -fchar.tab > char.c
1987-01-07 11:10:33 +00:00
1987-01-06 15:16:53 +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 'cpp'
OBJ = $(COBJ) $(LOBJ) $(GOBJ)
SRC = $(CSRC) $(LCSRC) $(GSRC)
cpp: $(OBJ) Makefile
1987-04-03 19:58:39 +00:00
$(CC) $(COPTIONS) $(LDFLAGS) $(OBJ) $(LIBS) -o cpp
1988-08-24 11:15:40 +00:00
-size cpp
1987-01-06 15:16:53 +00:00
cfiles: hfiles LLfiles $(GSRC)
@touch cfiles
install: all
1987-01-12 12:30:16 +00:00
rm -f $(CEMPP)
1987-01-06 15:16:53 +00:00
cp cpp $(CEMPP)
1987-03-02 12:31:44 +00:00
rm -f $(MANDIR)/cpp.6
1987-02-24 15:36:34 +00:00
cp cpp.6 $(MANDIR)/cpp.6
1987-01-06 15:16:53 +00:00
cmp: all
1987-02-24 15:36:34 +00:00
-cmp cpp $(CEMPP)
-cmp cpp.6 $(MANDIR)/cpp.6
1987-01-06 15:16:53 +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:
1988-11-16 10:43:15 +00:00
rm -f $(LCSRC) $(OBJ) $(GENERATED) $(GSRC) $(GHSRC) cpp Out
1987-01-06 15:16:53 +00:00
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
LLlex.o: LLlex.h
LLlex.o: Lpars.h
LLlex.o: bits.h
LLlex.o: charoffset.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: numsize.h
LLlex.o: strsize.h
LLmessage.o: LLlex.h
LLmessage.o: Lpars.h
LLmessage.o: file_info.h
1987-01-06 15:16:53 +00:00
ch7bin.o: Lpars.h
ch7mon.o: Lpars.h
domacro.o: LLlex.h
domacro.o: Lpars.h
domacro.o: bits.h
domacro.o: botch_free.h
domacro.o: charoffset.h
domacro.o: class.h
domacro.o: debug.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
domacro.o: interface.h
domacro.o: macro.h
domacro.o: nparams.h
domacro.o: parbufsize.h
domacro.o: textsize.h
error.o: LLlex.h
error.o: errout.h
error.o: file_info.h
1987-01-06 15:16:53 +00:00
idf.o: idf.h
init.o: charoffset.h
init.o: class.h
init.o: idf.h
init.o: interface.h
init.o: macro.h
input.o: file_info.h
input.o: input.h
input.o: inputtype.h
main.o: file_info.h
main.o: idfsize.h
options.o: charoffset.h
options.o: class.h
options.o: idf.h
options.o: idfsize.h
options.o: macro.h
preprocess.o: LLlex.h
preprocess.o: bits.h
preprocess.o: charoffset.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
preprocess.o: line_prefix.h
preprocess.o: obufsize.h
replace.o: LLlex.h
replace.o: charoffset.h
replace.o: class.h
replace.o: debug.h
replace.o: file_info.h
replace.o: idf.h
replace.o: input.h
replace.o: inputtype.h
replace.o: interface.h
replace.o: macro.h
replace.o: pathlength.h
replace.o: textsize.h
scan.o: charoffset.h
scan.o: class.h
scan.o: file_info.h
scan.o: idf.h
scan.o: input.h
scan.o: inputtype.h
scan.o: interface.h
scan.o: lapbuf.h
scan.o: macro.h
scan.o: nparams.h
skip.o: LLlex.h
skip.o: charoffset.h
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
tokenname.o: file_info.h
tokenname.o: idf.h
1987-01-06 15:16:53 +00:00
next.o: debug.h
expr.o: Lpars.h
tokenfile.o: Lpars.h
expression.o: LLlex.h
expression.o: Lpars.h
expression.o: file_info.h
1987-01-06 15:16:53 +00:00
Lpars.o: Lpars.h
char.o: charoffset.h
char.o: class.h
1987-01-06 15:16:53 +00:00
symbol2str.o: Lpars.h