1999-12-07 07:25:56 -08:00
|
|
|
include ../support/Makefile.common
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
OBJS= ../support/support.cmo flags.cmo copyright.cmo \
|
|
|
|
tsort.cmo tables.cmo printer.cmo lexer.cmo \
|
|
|
|
pplex.cmo ppyac.cmo ppexec.cmo ppparse.cmo \
|
2001-09-06 01:52:32 -07:00
|
|
|
parser.cmo compile.cmo intf.cmo maincompile.cmo
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
PPOBJS= pplex.cmo ppyac.cmo ppexec.cmo ppparse.cmo pp.cmo
|
|
|
|
|
|
|
|
all: tkcompiler$(EXE) pp$(EXE)
|
|
|
|
|
|
|
|
tkcompiler$(EXE) : $(OBJS)
|
|
|
|
$(CAMLC) -g $(LINKFLAGS) -o tkcompiler$(EXE) $(OBJS)
|
|
|
|
|
|
|
|
pp$(EXE): $(PPOBJS)
|
|
|
|
$(CAMLC) -g $(LINKFLAGS) -o pp$(EXE) $(PPOBJS)
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
lexer.ml: lexer.mll
|
2002-04-26 05:16:26 -07:00
|
|
|
$(CAMLLEX) lexer.mll
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
parser.ml parser.mli: parser.mly
|
2002-04-26 05:16:26 -07:00
|
|
|
$(CAMLYACC) -v parser.mly
|
|
|
|
|
|
|
|
pplex.ml: pplex.mll
|
|
|
|
$(CAMLLEX) pplex.mll
|
|
|
|
|
|
|
|
pplex.mli: ppyac.cmi
|
|
|
|
|
|
|
|
ppyac.ml ppyac.mli: ppyac.mly
|
|
|
|
$(CAMLYACC) -v ppyac.mly
|
|
|
|
|
|
|
|
copyright.ml: copyright
|
|
|
|
(echo "let copyright=\"\\"; \
|
|
|
|
cat copyright; \
|
|
|
|
echo "\""; \
|
|
|
|
echo "let write ~w = w copyright;;") > copyright.ml
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
clean :
|
2002-04-26 05:16:26 -07:00
|
|
|
rm -f *.cm* parser.ml parser.mli lexer.ml copyright.ml
|
|
|
|
rm -f pplex.ml ppyac.ml ppyac.mli ppyac.output
|
|
|
|
rm -f tkcompiler$(EXE) pp$(EXE) parser.output
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
scratch :
|
2002-04-26 05:16:26 -07:00
|
|
|
rm -f *.cm* parser.ml parser.mli lexer.ml tkcompiler$(EXE)
|
|
|
|
rm -f *.cm* pplex.ml ppyac.ml ppyac.mli pp$(EXE)
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
install:
|
2002-04-26 05:16:26 -07:00
|
|
|
cp tkcompiler$(EXE) $(INSTALLDIR)
|
|
|
|
cp pp$(EXE) $(INSTALLDIR)
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
.SUFFIXES :
|
|
|
|
.SUFFIXES : .mli .ml .cmi .cmo .mlp
|
|
|
|
|
|
|
|
.mli.cmi:
|
2002-04-26 05:16:26 -07:00
|
|
|
$(CAMLCOMP) -g $(COMPFLAGS) -I ../support $<
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
.ml.cmo:
|
2002-04-26 05:16:26 -07:00
|
|
|
$(CAMLCOMP) -g $(COMPFLAGS) -I ../support $<
|
1999-11-30 06:59:39 -08:00
|
|
|
|
2002-04-26 05:16:26 -07:00
|
|
|
depend: parser.ml parser.mli lexer.ml pplex.ml ppyac.ml ppyac.mli
|
|
|
|
$(CAMLDEP) *.mli *.ml > .depend
|
1999-11-30 06:59:39 -08:00
|
|
|
|
|
|
|
include .depend
|