REQUIRES = http helm-grafite_parser helm-logger helm-tactics helm-cic_disambiguation OCAMLOPTIONS = -thread -package "$(REQUIRES)" -pp camlp4o ifeq ($(origin OCAMLPATH), undefined) OCAMLFIND = OCAMLPATH=../../components/METAS ocamlfind else OCAMLFIND = ocamlfind endif OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLOPTIONS) OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS) OCAMLDEP = $(OCAMLFIND) ocamldep -package "$(REQUIRES)" -pp camlp4o MODULES = mooglePp SRCS = $(patsubst %,%.ml,$(MODULES)) $(patsubst %,%.mli,$(MODULES)) \ searchEngine.ml CMOS = $(patsubst %,%.cmo,$(MODULES)) CMXS = $(patsubst %,%.cmx,$(MODULES)) all: byte html world: byte opt byte: searchEngine opt: searchEngine.opt html .PHONY: html html: make -C html/ %.cmi: %.mli $(OCAMLC) -c $< %.cmo %.cmi: %.ml $(OCAMLC) -c $< %.cmx: %.ml $(OCAMLOPT) -c $< searchEngine: $(CMOS) searchEngine.ml $(OCAMLC) -linkpkg -o $@ $^ searchEngine.opt: $(CMXS) searchEngine.ml $(OCAMLOPT) -linkpkg -o $@ $^ clean: make -C html/ clean rm -f *.cm[aiox] *.o searchEngine{,.opt} .PHONY: depend depend: $(OCAMLDEP) $(SRCS) > .depend .PHONY: all opt clean include .depend