summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib-dynlink-csharp/Makefile
diff options
context:
space:
mode:
authorXavier Clerc <xavier.clerc@inria.fr>2010-04-08 12:44:07 +0000
committerXavier Clerc <xavier.clerc@inria.fr>2010-04-08 12:44:07 +0000
commitfa287cfba124e5bcc6c15d8274e19588567d0a7d (patch)
tree0e85f3f6d4db5c61167000c1f2a48f5470e1b881 /testsuite/tests/lib-dynlink-csharp/Makefile
parente09c0b1fcb364940c81c8fb657f04c61913ae44c (diff)
downloadocaml-fa287cfba124e5bcc6c15d8274e19588567d0a7d.tar.gz
Tests moved to 'lib-dynlink-csharp'
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10252 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'testsuite/tests/lib-dynlink-csharp/Makefile')
-rw-r--r--testsuite/tests/lib-dynlink-csharp/Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/testsuite/tests/lib-dynlink-csharp/Makefile b/testsuite/tests/lib-dynlink-csharp/Makefile
new file mode 100644
index 0000000000..774eaacac7
--- /dev/null
+++ b/testsuite/tests/lib-dynlink-csharp/Makefile
@@ -0,0 +1,58 @@
+CSC=csc
+
+default: prepare bytecode bytecode-dll native native-dll
+
+prepare:
+ @$(OCAMLC) -c plugin.ml
+ @$(OCAMLOPT) -o plugin.cmxs -shared plugin.ml
+
+bytecode:
+ @printf " ... testing 'bytecode':"
+ @if [ ! `which $(CSC) > /dev/null` ]; then \
+ echo " => passed"; \
+ else \
+ $(OCAMLC) -output-obj -o main.dll dynlink.cma main.ml entry.c; \
+ $(CSC) /out:main.exe main.cs; \
+ ./main.exe > bytecode.result; \
+ diff -q bytecode.reference bytecode.result > /dev/null && echo " => passed" || echo " => failed"; \
+ fi
+
+bytecode-dll:
+ @printf " ... testing 'bytecode-dll':"
+ @if [ ! `which $(CSC) > /dev/null` ]; then \
+ echo " => passed"; \
+ else \
+ $(OCAMLC) -output-obj -o main_obj.$(O) dynlink.cma entry.c main.ml; \
+ $(MKDLL) -maindll -o main.dll main_obj.$(O) entry.$(O) ../../byterun/libcamlrun.$(A) $(BYTECCLIBS) -v; \
+ $(CSC) /out:main.exe main.cs; \
+ ./main.exe > bytecode.result; \
+ diff -q bytecode.reference bytecode.result > /dev/null && echo " => passed" || echo " => failed"; \
+ fi
+
+native:
+ @printf " ... testing 'native':"
+ @if [ ! `which $(CSC) > /dev/null` ]; then \
+ echo " => passed"; \
+ else \
+ $(OCAMLOPT) -output-obj -o main.dll dynlink.cmxa entry.c main.ml; \
+ $(CSC) /out:main.exe main.cs; \
+ ./main.exe > native.result; \
+ diff -q native.reference native.result > /dev/null && echo " => passed" || echo " => failed"; \
+ fi
+
+native-dll:
+ @printf " ... testing 'native-dll':"
+ @if [ ! `which $(CSC) > /dev/null` ]; then \
+ echo " => passed"; \
+ else \
+ $(OCAMLOPT) -output-obj -o main_obj.$(O) dynlink.cmxa entry.c main.ml; \
+ $(MKDLL) -maindll -o main.dll main_obj.$(O) entry.$(O) ../../asmrun/libasmrun.lib -v; \
+ $(CSC) /out:main.exe main.cs; \
+ ./main.exe > native.result; \
+ diff -q native.reference native.result > /dev/null && echo " => passed" || echo " => failed"; \
+ fi
+
+clean: defaultclean
+ @rm -f *.result *.exe *.dll
+
+include ../../makefiles/Makefile.common