Make mkbundle use SDKs instead of a single runtime for cross compilation
[mono.git] / mcs / tools / mkbundle / Makefile
index 05faf5e8c685e1ec0ce4d295e848619f974d28c8..64a1b9cbf928bc1824705bdebd3d95049321cb23 100644 (file)
@@ -11,10 +11,23 @@ RESOURCE_FILES = $(OTHER_RES)
 LOCAL_MCS_FLAGS= $(OTHER_RES:%=-resource:%)
 
 LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE
-LIB_REFS = System.Xml System System.Core
+LIB_REFS = System.Xml System System.Core System.IO.Compression.FileSystem
 
 EXTRA_DISTFILES = $(RESOURCE_FILES)
 
 include ../../build/executable.make
 
 mkbundle.exe: $(RESOURCE_FILES)
+
+test-simple: simple.exe
+       mono --debug $(the_lib) --simple simple.exe -o foo && ./foo
+       mono --debug $(the_lib) --cross default simple.exe -o foo && ./foo
+       mono --debug $(the_lib) --sdk `dirname \`which mono\``/.. simple.exe -o foo && ./foo
+       -rm DEMO.zip
+       mono-package-runtime `dirname \`which mono\``/.. DEMO
+       mkdir -p ~/.mono/targets/DEMO
+       unzip -d ~/.mono/targets/DEMO DEMO.zip
+       mono --debug $(the_lib) --cross DEMO simple.exe -o foo && ./foo
+
+simple.exe: Makefile
+       echo 'class X { static void Main () { System.Console.WriteLine ("OK");}}' > simple.cs && mcs simple.cs