diff --git a/Makefile b/Makefile index 4f0c3e35a..d7600707d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,17 @@ .PHONY: all clean test +ifdef CROSS + OCAMLLIB=$(abspath $(shell ocamlfind printconf path)) + OCAMLBUILD=ocamlbuild -toolchain windows -I src -I lib -I parser -use-menhir -use-ocamlfind -classic-display \ + -menhir "menhir --infer --explain" \ + -ocamldep "ocamldep -predicates custom_ppx -ppx '$(OCAMLLIB)/ppx_deriving/ppx_deriving $(OCAMLLIB)/ppx_deriving/ppx_deriving_show.cma $(OCAMLLIB)/ppx_deriving_yojson/ppx_deriving_yojson.cma'" \ + -ocamlc "ocamlc -predicates custom_ppx -ppx '$(OCAMLLIB)/ppx_deriving/ppx_deriving $(OCAMLLIB)/ppx_deriving/ppx_deriving_show.cma $(OCAMLLIB)/ppx_deriving_yojson/ppx_deriving_yojson.cma'" \ + -ocamlopt "ocamlopt -predicates custom_ppx -ppx '$(OCAMLLIB)/ppx_deriving/ppx_deriving $(OCAMLLIB)/ppx_deriving/ppx_deriving_show.cma $(OCAMLLIB)/ppx_deriving_yojson/ppx_deriving_yojson.cma'" +else OCAMLBUILD=ocamlbuild -I src -I lib -I parser -use-menhir -use-ocamlfind -classic-display \ -menhir "menhir --infer --explain" +endif + FLAVOR?=native TARGETS=Kremlin.$(FLAVOR) Tests.$(FLAVOR)