Double <-> Int64 conversion is much faster now.
[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 (basic, $(PROFILE))
12
13 else
14
15 ifeq (2, $(FRAMEWORK_VERSION_MAJOR))
16 LIB_MCS_FLAGS += --runtime:v2
17 else
18 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
19 LIB_MCS_FLAGS += --runtime:v4
20 else
21 $(error Unknown framework version)
22 endif
23 endif
24
25 endif
26
27 LIBRARY_COMPILE = $(BOOT_COMPILE)
28 LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
29
30 RESOURCE_FILES = \
31         resources/collation.core.bin \
32         resources/collation.tailoring.bin \
33         resources/collation.cjkCHS.bin \
34         resources/collation.cjkCHT.bin \
35         resources/collation.cjkJA.bin \
36         resources/collation.cjkKO.bin \
37         resources/collation.cjkKOlv2.bin
38
39 LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB -d:LIBC
40 DEFAULT_REFERENCES =
41
42 # System.IO/DirectoryInfoTest.cs needs Mono.Posix
43 TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe -r:Mono.Posix.dll -r:System.Core.dll -define:MONO_DATACONVERTER_STATIC_METHODS
44
45 EXTRA_DISTFILES = \
46         Test/resources/MyResources.resources    \
47         Test/resources/MyResources.de.resources \
48         Test/resources/Empty.resources          \
49         Test/resources/AFile.txt                \
50         Test/resources/StreamTest.resources     \
51         Test/resources/StreamTest.ja.resources  \
52         Test/resources/bug81759.resources       \
53         Test/resources/415628.bin               \
54         Test/resources/Fergie.GED               \
55         $(RESOURCE_FILES)
56
57 include $(topdir)/build/library.make
58
59 ifdef FIXME_CORLIB_CMP
60 # corlib_cmp
61 corlib_flags = -unsafe -nostdlib
62 cmplib = $(topdir)/class/lib/$(PROFILE)/corlib_cmp.dll
63 cmppdb = $(cmplib:.dll=.pdb)
64 cmp_response = $(depsdir)/$(PROFILE)_corlib_cmp.dll.response
65 cmp_makefrag = $(depsdir)/$(PROFILE)_corlib_cmp.dll.makefrag
66 cmp_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
67
68 EXTRA_DISTFILES += corlib_cmp.dll.excludes
69 CLEAN_FILES += $(cmplib) $(cmp_response) $(cmp_makefrag) $(cmppdb)
70
71 $(cmplib): $(cmp_makefrag) $(cmp_response)
72         $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(cmp_flags) -target:library -out:$@ @$(cmp_response)
73
74 $(cmp_response): $(sourcefile) corlib_cmp.dll.excludes
75         @echo Creating $@ ...
76         @sort $(sourcefile) corlib_cmp.dll.excludes | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
77
78 $(cmp_makefrag): $(cmp_response)
79         @echo Creating $@ ...
80         @sed 's,^,$(cmplib): ,' $< >$@
81
82 # Since we make corlib_cmp on demand, there isn't a real need
83 # to have full dep tracking for it. Also, the generation of this
84 # file is busted on Win32 ('sort' seems to mess up line endings),
85 # leading to a broken build.
86 #
87 # -include $(cmp_makefrag)
88
89 $(cmp_response) $(cmp_makefrag): Makefile $(depsdir)/.stamp
90 endif
91
92 vtsdir = Test/System.Runtime.Serialization.Formatters.Binary/VersionTolerantSerialization
93 vtslibs = \
94         $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
95         $(vtsdir)/$(PROFILE)_TestLib/2.0/Address.dll \
96         $(vtsdir)/$(PROFILE)_TestLib/3.0/Address.dll \
97         $(vtsdir)/$(PROFILE)_TestLib/4.0/Address.dll \
98         $(vtsdir)/$(PROFILE)_TestLib/5.0/Address.dll \
99         $(vtsdir)/$(PROFILE)_TestLib/6.0/Address.dll
100
101 test-vts: $(vtslibs) $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe
102
103 $(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializationTestLib/%/Address.cs
104         @mkdir -p $(dir $@)
105         $(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^
106
107 $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll
108         $(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \
109                 -r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
110                 $(vtsdir)/BinarySerializationOverVersions.cs -out:$@
111         @cp $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(vtsdir)/$(PROFILE)_TestLib
112
113 # Need to define MONO_PATH to an absolute dir since the test is ran from a subdir
114 run-test-vts: test-vts
115         @echo Running vts tests...
116         PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) -noshadow \
117                 $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe
118 test: test-vts
119 run-test: run-test-vts
120
121 EXTRA_DISTFILES += \
122         $(vtsdir)/VersionTolerantSerializationTestLib/1.0/Address.cs \
123         $(vtsdir)/VersionTolerantSerializationTestLib/2.0/Address.cs \
124         $(vtsdir)/VersionTolerantSerializationTestLib/3.0/Address.cs \
125         $(vtsdir)/VersionTolerantSerializationTestLib/4.0/Address.cs \
126         $(vtsdir)/VersionTolerantSerializationTestLib/5.0/Address.cs \
127         $(vtsdir)/VersionTolerantSerializationTestLib/6.0/Address.cs \
128         $(vtsdir)/BinarySerializationOverVersions.cs