1 BIN_DIR = /usr/local/bin
2 REQUIRES = helm-cic_proof_checking http
4 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread
5 ifeq ($(origin OCAMLPATH), undefined)
6 OCAMLFIND = OCAMLPATH=../../components/METAS ocamlfind
10 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLOPTIONS) -g
11 OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS)
14 LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
15 LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
17 all: $(PROOFCHECKEROBJS) proofChecker
18 opt: $(PROOFCHECKEROBJS:.cmo=.cmx) proofChecker.opt
20 DEPOBJS = proofChecker.ml
22 PROOFCHECKEROBJS = proofChecker.cmo
25 $(OCAMLDEP) $(DEPOBJS) > .depend
27 proofChecker: $(PROOFCHECKEROBJS) $(LIBRARIES)
28 $(OCAMLC) -linkpkg -o proofChecker $(PROOFCHECKEROBJS)
30 proofChecker.opt: $(PROOFCHECKEROBJS:.cmo=.cmx) $(LIBRARIES_OPT)
31 $(OCAMLOPT) -linkpkg -o proofChecker.opt $(PROOFCHECKEROBJS:.cmo=.cmx)
33 .SUFFIXES: .ml .mli .cmo .cmi .cmx
36 .mli.cmi: $(LIBRARIES)
38 .ml.cmx: $(LIBRARIES_OPT)
42 rm -f *.cm[iox] *.o proofChecker proofChecker.opt
45 cp proofChecker proofChecker.opt $(BIN_DIR)
48 rm -f $(BIN_DIR)/proofChecker $(BIN_DIR)/proofChecker.opt
50 .PHONY: install uninstall clean