1 BIN_DIR = /usr/local/bin
2 REQUIRES = unix helm-cic_textual_parser helm-cic_proof_checking \
3 helm-mathql helm-mathql_interpreter helm-mathql_generator \
6 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)"
7 OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS)
8 OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS)
13 LIBRARIES = $(shell ocamlfind query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
14 LIBRARIES_OPT = $(shell ocamlfind query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
20 DEPOBJS = $(MQTOP) $(MQITOP) $(MQGTOP)
21 AUXOBJS = mQGTopParser.ml mQGTopParser.mli mQGTopLexer.ml
24 opt: $(DEPOBJS:.ml=.opt)
27 $(OCAMLDEP) $(DEPOBJS) $(AUXOBJS) > .depend
29 mqtop: $(MQTOP:.ml=.cmo) $(LIBRARIES)
30 $(OCAMLC) -linkpkg -o mqtop $(MQTOP:.ml=.cmo)
32 mqtop.opt: $(MQTOP:.ml=.cmx) $(LIBRARIES_OPT)
33 $(OCAMLOPT) -linkpkg -o mqtop.opt $(MQTOP:.ml=.cmx)
35 mqitop: $(MQITOP:.ml=.cmo) $(LIBRARIES)
36 $(OCAMLC) -linkpkg -o mqitop $(MQITOP:.ml=.cmo)
38 mqitop.opt: $(MQITOP:.ml=.cmx) $(LIBRARIES_OPT)
39 $(OCAMLOPT) -linkpkg -o mqitop.opt $(MQITOP:.ml=.cmx)
41 mqgtop: mQGTopParser.cmi $(AUXOBJS:.ml=.cmo) $(MQGTOP:.ml=.cmo) $(LIBRARIES)
42 $(OCAMLC) -linkpkg -o mqgtop $(AUXOBJS:.ml=.cmo) $(MQGTOP:.ml=.cmo)
44 mqgtop.opt: $(AUXOBJS:.ml=.cmx) $(MQGTOP:.ml=.cmx) $(LIBRARIES_OPT)
45 $(OCAMLOPT) -linkpkg -o mqgtop.opt $(AUXOBJS:.ml=.cmx) $(MQGTOP:.ml=.cmx)
47 .SUFFIXES: .ml .mli .cmo .cmi .cmx .mly .mll
50 .mli.cmi: $(LIBRARIES)
52 .ml.cmx: $(LIBRARIES_OPT)
61 $(DEPOBJS:%.ml=%.cmo): $(LIBRARIES)
62 $(DEPOBJS:%.ml=%.cmx): $(LIBRARIES_OPT)
65 rm -f *.cm[iox] *.o $(DEPOBJS:.ml=) $(DEPOBJS:.ml=.opt) \
66 mQGTopParser.ml mQGTopParser.mli mQGTopLexer.ml
69 cp $(DEPOBJS:.ml=) $(DEPOBJS:.ml=.opt) $(BIN_DIR)
73 rm -f $(DEPOBJS:.ml=) $(DEPOBJS:.ml=.opt)
75 .PHONY: install uninstall clean
77 ifneq ($(MAKECMDGOALS), depend)