Commit add01315 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Replaced OCamlMakefile with custom Makefile

parent 3feaacd0
RESULT := mincss RESULT := mincss
SOURCES := types.ml types.mli stringify.ml lexer.mll parser.mly util.ml parse.ml \ BASENAMES := types stringify parser lexer util parse main
main.ml
PRE_TARGETS := types.ml types.cmi stringify.cmi
LIBS := str
# Set debugging flag to enable exception backtraces for OCAMLRUNPARAM=b OFILES := $(addsuffix .cmx,$(BASENAMES))
OCAMLFLAGS := -g
OCAMLYACC := menhir OCAMLCFLAGS := -g
YFLAGS := --infer --explain --dump OCAMLLDFLAGS :=
OCAMLLDLIBS := str.cmxa
.PHONY: all myclean .PHONY: all clean
.PRECIOUS: $(addprefix .cmi,$(BASENAMES))
all: native-code all: $(RESULT)
clean:: myclean %.ml: %.mll
ocamllex -o $@ $<
# The Types module needs an implementation to stop ocamlc from complaining %.ml: %.mly
types.ml: types.mli menhir --infer --explain $<
cp $< $@
myclean: %.cmi: %.mli
rm -f a.out types.ml parser.conflicts parser.automaton ocamlc -c $(OCAMLCFLAGS) -o $@ $<
include OCamlMakefile 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) $^
clean:
rm -f *.cmi *.cmx *.o lexer.ml parser.ml parser.mli $(RESULT)
This diff is collapsed.
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