diff options
Diffstat (limited to 'ocaml-binary-annot/testsuite/tests/callback/Makefile')
| -rw-r--r-- | ocaml-binary-annot/testsuite/tests/callback/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ocaml-binary-annot/testsuite/tests/callback/Makefile b/ocaml-binary-annot/testsuite/tests/callback/Makefile new file mode 100644 index 0000000000..0cec7e63f4 --- /dev/null +++ b/ocaml-binary-annot/testsuite/tests/callback/Makefile @@ -0,0 +1,27 @@ +CC=$(NATIVECC) -I $(TOPDIR)/byterun + +default: run-byte run-opt + +common: + @$(CC) -c callbackprim.c + +run-byte: common + @printf " ... testing 'bytecode':" + @$(OCAMLC) -c tcallback.ml + @$(OCAMLC) -o ./program -custom unix.cma callbackprim.$(O) tcallback.cmo + @./program > bytecode.result + @diff -q reference bytecode.result || (echo " => failed" && exit 1) + @echo " => passed" + +run-opt: common + @printf " ... testing 'native':" + @$(OCAMLOPT) -c tcallback.ml + @$(OCAMLOPT) -o ./program unix.cmxa callbackprim.$(O) tcallback.cmx + @./program > native.result + @diff -q reference native.result || (echo " => failed" && exit 1) + @echo " => passed" + +clean: defaultclean + @rm -f *.result ./program + +include ../../makefiles/Makefile.common |
