-BIN_DIR = /usr/local/bin
-REQUIRES = helm-cic
-PREDICATES =
-OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)"
-OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS)
-OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS)
-OCAMLDEP = ocamldep
-
-all: cicSubstitution.cmo cicEnvironment.cmo cicPp.cmo cicMiniReduction.cmo \
- cicReduction.cmo cicTypeChecker.cmo cicCooking.cmo
-opt: cicSubstitution.cmx cicEnvironment.cmx cicPp.cmx cicMiniReduction.cmx \
- cicReduction.cmx cicTypeChecker.cmx cicCooking.cmx
-DEPOBJS = cicPp.mli cicPp.ml cicEnvironment.mli cicEnvironment.ml \
- cicSubstitution.mli cicSubstitution.ml cicReduction.mli \
- cicReduction.ml cicTypeChecker.mli cicTypeChecker.ml \
- cicCooking.mli cicCooking.ml cicMinireduction.mli cicMiniReduction.ml
-
-depend:
- $(OCAMLDEP) $(DEPOBJS) > .depend
+PACKAGE = cic_proof_checking
+REQUIRES = helm-cic helm-logger helm-getter
+PREDICATES =
-.SUFFIXES: .ml .mli .cmo .cmi .cmx
-.ml.cmo:
- $(OCAMLC) -c $<
-.mli.cmi:
- $(OCAMLC) -c $<
-.ml.cmx:
- $(OCAMLOPT) -c $<
+REDUCTION_IMPLEMENTATION = cicReductionMachine.ml
-clean:
- rm -f *.cm[iox]
+INTERFACE_FILES = \
+ cicLogger.mli \
+ cicEnvironment.mli cicPp.mli cicSubstitution.mli \
+ cicMiniReduction.mli cicReductionNaif.mli cicReduction.mli \
+ cicTypeChecker.mli
+IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
-install:
- #cp
+# Metadata tools only need zeta-reduction
+EXTRA_OBJECTS_TO_INSTALL = \
+ cicSubstitution.cmo cicSubstitution.cmx cicSubstitution.o \
+ cicMiniReduction.cmo cicMiniReduction.cmx cicMiniReduction.o
+EXTRA_OBJECTS_TO_CLEAN =
-uninstall:
- #rm -f
+include ../Makefile.common
-.PHONY: install uninstall clean
+cicReduction.ml: $(REDUCTION_IMPLEMENTATION)
+ if ! [ -f $@ ]; then \
+ echo "Using $< for $@"; \
+ ln -s $< $@; \
+ else \
+ true; \
+ fi
-include .depend