Make mkbundle use SDKs instead of a single runtime for cross compilation
[mono.git] / mcs / tools / mkbundle / Makefile
1 thisdir = tools/mkbundle
2 SUBDIRS = 
3 include ../../build/rules.make
4
5 PROGRAM = mkbundle.exe
6
7 OTHER_RES = template.c template_z.c template_main.c
8
9 RESOURCE_FILES = $(OTHER_RES)
10
11 LOCAL_MCS_FLAGS= $(OTHER_RES:%=-resource:%)
12
13 LOCAL_MCS_FLAGS += -d:STATIC,NO_SYMBOL_WRITER,NO_AUTHENTICODE
14 LIB_REFS = System.Xml System System.Core System.IO.Compression.FileSystem
15
16 EXTRA_DISTFILES = $(RESOURCE_FILES)
17
18 include ../../build/executable.make
19
20 mkbundle.exe: $(RESOURCE_FILES)
21
22 test-simple: simple.exe
23         mono --debug $(the_lib) --simple simple.exe -o foo && ./foo
24         mono --debug $(the_lib) --cross default simple.exe -o foo && ./foo
25         mono --debug $(the_lib) --sdk `dirname \`which mono\``/.. simple.exe -o foo && ./foo
26         -rm DEMO.zip
27         mono-package-runtime `dirname \`which mono\``/.. DEMO
28         mkdir -p ~/.mono/targets/DEMO
29         unzip -d ~/.mono/targets/DEMO DEMO.zip
30         mono --debug $(the_lib) --cross DEMO simple.exe -o foo && ./foo
31
32 simple.exe: Makefile
33         echo 'class X { static void Main () { System.Console.WriteLine ("OK");}}' > simple.cs && mcs simple.cs