Merge remote branch 'upstream/master'
[mono.git] / mcs / class / corlib / Makefile
1 thisdir = class/corlib
2 SUBDIRS =
3 include ../../build/rules.make
4 export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/corlib
5
6 LIBRARY = corlib.dll
7 LIBRARY_NAME = mscorlib.dll
8 LIB_MCS_FLAGS = $(RESOURCE_FILES:%=-resource:%)
9 LIBRARY_USE_INTERMEDIATE_FILE = yes
10
11 ifeq (4.0, $(FRAMEWORK_VERSION))
12 LIB_MCS_FLAGS += --runtime:v4
13 endif
14
15 LIBRARY_COMPILE = $(BOOT_COMPILE)
16 LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
17
18 RESOURCE_FILES = \
19         resources/collation.core.bin \
20         resources/collation.tailoring.bin \
21         resources/collation.cjkCHS.bin \
22         resources/collation.cjkCHT.bin \
23         resources/collation.cjkJA.bin \
24         resources/collation.cjkKO.bin \
25         resources/collation.cjkKOlv2.bin
26
27 LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB -d:LIBC
28 DEFAULT_REFERENCES =
29
30 # System.IO/DirectoryInfoTest.cs needs Mono.Posix
31 TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe -r:$(topdir)/class/lib/$(PROFILE)/Mono.Posix.dll -define:MONO_DATACONVERTER_STATIC_METHODS
32
33 EXTRA_DISTFILES = \
34         Test/ms_run_test.sh                     \
35         Test/resources/MyResources.resources    \
36         Test/resources/MyResources.de.resources \
37         Test/resources/Empty.resources          \
38         Test/resources/AFile.txt                \
39         Test/resources/StreamTest.resources     \
40         Test/resources/StreamTest.ja.resources  \
41         Test/resources/bug81759.resources       \
42         Test/resources/415628.bin               \
43         Test/resources/Fergie.GED               \
44         $(RESOURCE_FILES)
45
46 include $(topdir)/build/library.make
47
48 ifdef FIXME_CORLIB_CMP
49 # corlib_cmp
50 corlib_flags = -unsafe -nostdlib
51 cmplib = $(topdir)/class/lib/$(PROFILE)/corlib_cmp.dll
52 cmppdb = $(cmplib:.dll=.pdb)
53 cmp_response = $(depsdir)/$(PROFILE)_corlib_cmp.dll.response
54 cmp_makefrag = $(depsdir)/$(PROFILE)_corlib_cmp.dll.makefrag
55 cmp_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
56
57 EXTRA_DISTFILES += corlib_cmp.dll.excludes
58 CLEAN_FILES += $(cmplib) $(cmp_response) $(cmp_makefrag) $(cmppdb)
59
60 $(cmplib): $(cmp_makefrag) $(cmp_response)
61         $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(cmp_flags) -target:library -out:$@ @$(cmp_response)
62
63 $(cmp_response): $(sourcefile) corlib_cmp.dll.excludes
64         @echo Creating $@ ...
65         @sort $(sourcefile) corlib_cmp.dll.excludes | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
66
67 $(cmp_makefrag): $(cmp_response)
68         @echo Creating $@ ...
69         @sed 's,^,$(cmplib): ,' $< >$@
70
71 # Since we make corlib_cmp on demand, there isn't a real need
72 # to have full dep tracking for it. Also, the generation of this
73 # file is busted on Win32 ('sort' seems to mess up line endings),
74 # leading to a broken build.
75 #
76 # -include $(cmp_makefrag)
77
78 $(cmp_response) $(cmp_makefrag): Makefile $(depsdir)/.stamp
79 endif
80
81 vts = VersionTolerantSerialization
82 vtsdir = Test/System.Runtime.Serialization.Formatters.Binary/$(vts)
83 test-vts:
84         $(MCS) -target:library \
85                 $(vtsdir)/$(vts)TestLib/1.0/Address.cs
86         $(MCS) $(test_nunit_ref) \
87                 -r:$(vtsdir)/$(vts)TestLib/1.0/Address.dll \
88                 $(vtsdir)/BinarySerializationOverVersions.cs
89         cp $(vtsdir)/$(vts)TestLib/1.0/Address.dll $(vtsdir)
90         $(MCS) -target:library \
91                 $(vtsdir)/$(vts)TestLib/2.0/Address.cs
92         $(MCS) -target:library \
93                 $(vtsdir)/$(vts)TestLib/3.0/Address.cs
94         $(MCS) -target:library \
95                 $(vtsdir)/$(vts)TestLib/4.0/Address.cs
96         $(MCS) -target:library \
97                 $(vtsdir)/$(vts)TestLib/5.0/Address.cs
98 run-test-vts: test-vts
99         $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) -noshadow \
100                 $(vtsdir)/BinarySerializationOverVersions.exe 
101 test: test-vts
102 run-test: run-test-vts
103
104 EXTRA_DISTFILES += \
105         $(vtsdir)/$(vts)TestLib/1.0/Address.cs \
106         $(vtsdir)/$(vts)TestLib/2.0/Address.cs \
107         $(vtsdir)/$(vts)TestLib/3.0/Address.cs \
108         $(vtsdir)/$(vts)TestLib/4.0/Address.cs \
109         $(vtsdir)/$(vts)TestLib/5.0/Address.cs \
110         $(vtsdir)/BinarySerializationOverVersions.cs