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

Replaced OCamlMakefile with custom Makefile

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