3 include ../../build/rules.make
4 export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/corlib
7 resources/collation.core.bin \
8 resources/collation.tailoring.bin \
9 resources/collation.cjkCHS.bin \
10 resources/collation.cjkCHT.bin \
11 resources/collation.cjkJA.bin \
12 resources/collation.cjkKO.bin \
13 resources/collation.cjkKOlv2.bin
15 corlib_flags = -unsafe -nostdlib
16 LOCAL_MCS_FLAGS = -nowarn:169,612,618,649 -d:INSIDE_CORLIB
18 ifneq ($(FRAMEWORK_VERSION),1.0)
19 LOCAL_MCS_FLAGS += -nowarn:414
23 LIBRARY_NAME = mscorlib.dll
24 LIB_MCS_FLAGS = $(corlib_flags) $(RESOURCE_FILES:%=/resource:%)
25 LIBRARY_USE_INTERMEDIATE_FILE = yes
27 LIBRARY_COMPILE = $(BOOT_COMPILE)
28 LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
31 corlib.dll.win32-excludes corlib_cmp.dll.excludes corlib_res.dll.excludes \
32 $(plattestlib).excludes \
34 Test/resources/MyResources.resources \
35 Test/resources/Empty.resources \
36 Test/resources/AFile.txt \
39 CLEAN_FILES = $(cmplib) $(reslib) $(plattestlib) $(plattestlib).sources \
40 $(cmp_response) $(cmp_makefrag) \
41 $(res_response) $(res_makefrag) \
42 $(cmppdb) $(respdb) $(plattestpdb)
44 # If building on a non mono-native platform, default
45 # to running the unit tests on its corlib, to see if
46 # our tests are complaint with their (hopefully bug-free)
47 # corlib. If on a mono-native platform, test our actual
50 # You can access either one on demand with either 'make
51 # run-monotest' or 'make run-plattest'.
53 plattestlib = corlib_plattest.dll
54 plattestpdb = $(patsubst %.dll,%.pdb,$(plattestlib))
55 $(plattestlib).sources: corlib_test.dll.sources $(plattestlib).excludes
56 sort corlib_test.dll.sources $(plattestlib).excludes | uniq -u >$@
58 TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe
60 ifndef PLATFORM_MONO_NATIVE
61 test_lib = $(plattestlib)
62 test_against = $(PLATFORM_CORLIB)
63 HAVE_CS_TESTS = $(plattestlib).sources
65 ## for now, compiling the testsuite with CSC causes CS0583. So compile with internal MCS
66 TEST_COMPILE = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_MCS) $(USE_MCS_FLAGS)
69 include ../../build/library.make
71 ifndef PLATFORM_MONO_NATIVE
74 $(MAKE) test_lib=corlib_test.dll test_against=$(reslib) run-test
77 $(MAKE) test_lib=$(plattestlib) test_against='$(PLATFORM_CORLIB)' run-test
80 run-monotest: run-test
84 cmplib = $(topdir)/class/lib/$(PROFILE)/corlib_cmp.dll
85 cmppdb = $(cmplib:.dll=.pdb)
86 cmp_response = $(depsdir)/$(PROFILE)_corlib_cmp.dll.response
87 cmp_makefrag = $(depsdir)/$(PROFILE)_corlib_cmp.dll.makefrag
88 cmp_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
90 $(cmplib): $(cmp_makefrag) $(cmp_response)
91 $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(cmp_flags) -target:library -out:$@ @$(cmp_response)
93 $(cmp_response): $(sourcefile) corlib_cmp.dll.excludes
95 @sort $(sourcefile) corlib_cmp.dll.excludes | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
97 $(cmp_makefrag): $(cmp_response)
99 @sed 's,^,$(cmplib): ,' $< >$@
101 # Since we make corlib_cmp on demand, there isn't a real need
102 # to have full dep tracking for it. Also, the generation of this
103 # file is busted on Win32 ('sort' seems to mess up line endings),
104 # leading to a broken build.
106 # -include $(cmp_makefrag)
109 reslib = $(topdir)/class/lib/$(PROFILE)/corlib_res.dll
110 respdb = $(reslib:.dll=.pdb)
111 res_response = $(depsdir)/$(PROFILE)_corlib_res.dll.response
112 res_makefrag = $(depsdir)/$(PROFILE)_corlib_res.dll.makefrag
113 res_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
115 $(reslib): $(res_makefrag) $(res_response)
116 $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(res_flags) -target:library -out:$@ @$(res_response)
118 $(res_response): $(sourcefile) corlib_res.dll.excludes
119 @echo Creating $@ ...
120 @sort $(sourcefile) corlib_res.dll.excludes | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
122 # warning: embedded tab in the 'echo touch' line
123 $(res_makefrag): $(res_response)
124 @echo Creating $@ ...
125 @sed 's,^,$(reslib): ,' $< >$@
127 -include $(res_makefrag)