Commit 666cf5ca authored by Taddeüs Kroes's avatar Taddeüs Kroes

Dependency fix

parent 5c088307
......@@ -6,28 +6,33 @@ OCAMLCFLAGS := -g
OCAMLLDFLAGS :=
OCAMLLDLIBS := str.cmxa
OCAMLLEX := ocamllex
OCAMLYACC := menhir --infer --explain --dump
.PHONY: all clean
.PRECIOUS: $(addprefix .cmi,$(BASENAMES))
all: $(RESULT)
%.ml: %.mll
ocamllex -o $@ $<
$(OCAMLLEX) -o $@ $<
%.ml: %.mly
menhir --infer --explain $<
$(OCAMLYACC) $<
%.cmi: %.mli
ocamlc -c $(OCAMLCFLAGS) -o $@ $<
parser.cmx: parser.cmi
parser.mli: parser.ml
%.cmx: %.ml
ocamlfind ocamlopt -package batteries -c $(OCAMLCFLAGS) -o $@ $(<:.cmi=.ml)
$(RESULT): $(OFILES)
ocamlopt -o $@ $(OCAMLLDFLAGS) $(OCAMLLDLIBS) $^
# intra-module dependencies
parser.cmx: parser.cmi
parser.mli: parser.ml
parse.cmx: lexer.cmi parser.cmi
clean:
rm -f *.cmi *.cmx *.o lexer.ml parser.ml parser.mli $(RESULT)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment