# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
OBJECTS = \
+ config.cmx \
utils.cmx \
+ cmdline.cmx \
ast.cmx \
+ eval.cmx \
parser.cmx \
lexer.cmx \
parse.cmx \
rm -f parser.ml parser.mli lexer.ml parser.conflicts stamp-parser
rm -f goals
-goals: $(OBJECTS)
- @OCAMLFIND@ opt $^ -o $@
-
+OCAMLPACKAGES = -package str,unix
OCAMLFLAGS = -g -safe-string -warn-error CDEFLMPSUVYZX+52-3
+goals: $(OBJECTS)
+ @OCAMLFIND@ opt $(OCAMLFLAGS) $(OCAMLPACKAGES) -linkpkg $^ -o $@
+
%.cmi: %.mli
- @OCAMLFIND@ c $(OCAMLFLAGS) -c $< -o $@
+ @OCAMLFIND@ c $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
%.cmo: %.ml
- @OCAMLFIND@ c $(OCAMLFLAGS) -c $< -o $@
+ @OCAMLFIND@ c $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
%.cmx: %.ml
- @OCAMLFIND@ opt $(OCAMLFLAGS) -c $< -o $@
+ @OCAMLFIND@ opt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
parser.ml parser.mli: stamp-parser
stamp-parser: parser.mly
@MENHIR@ --explain $<
+# Hack required to get includes working.
+ echo 'val lexer_read : (Lexing.lexbuf -> token) option ref' >> parser.mli
touch $@
lexer.ml: lexer.mll lexer.cmi parser.ml
-include .depend
Makefile: Makefile.in ../config.status
- ../config.status Makefile
+ ../config.status $@
+
+config.ml: config.ml.in ../config.status
+ ../config.status $@
.PHONY: all clean depend