diff --git a/ml-proto/Makefile b/ml-proto/Makefile index 6be1b1734e..bdaf8cc189 100644 --- a/ml-proto/Makefile +++ b/ml-proto/Makefile @@ -5,6 +5,8 @@ # NAME = wasm +NAME_OPT = $(NAME).opt +NAME_UNOPT = $(NAME) Makefile = Makefile OCB_FLAGS += # -use-ocamlfind @@ -14,12 +16,14 @@ OCB_FLAGS += -libs str,bigarray OCB_FLAGS += -I host -I given -I spec OCB = ocamlbuild $(OCB_FLAGS) -all: $(NAME) unopt +unopt: $(NAME_UNOPT) +opt: $(NAME_OPT) +all: opt unopt test -$(NAME): main.native +$(NAME_OPT): main.native mv $< $@ -unopt: main.d.byte +$(NAME_UNOPT): main.d.byte mv $< $@ main.native: $(MAKEFILE) @@ -28,6 +32,9 @@ main.native: $(MAKEFILE) main.d.byte: $(MAKEFILE) $(OCB) $@ +test: + ./runtests.py + clean: $(OCB) -clean @@ -40,4 +47,5 @@ zip: git archive --format=zip --prefix=$(NAME)/ \ -o $(NAME).zip HEAD -.PHONY: all clean check zip +.INTERMEDIATE: main.native main.d.byte +.PHONY: all opt unopt clean test check zip