* corlib_test.dll.sources: added Consts.cs.
[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 = $(corlib_flags) $(RESOURCE_FILES:%=-resource:%)
9 LIBRARY_USE_INTERMEDIATE_FILE = yes
10
11 ifneq (net_2_1, $(PROFILE))
12 LIBRARY_COMPILE = $(BOOT_COMPILE)
13 else
14 LIBRARY_COMPILE = MONO_PATH="$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_SMCS) $(USE_MCS_FLAGS)
15 endif
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 corlib_flags = -unsafe -nostdlib
28 LOCAL_MCS_FLAGS = -nowarn:169,612,618,649 -d:INSIDE_CORLIB
29
30 ifneq ($(FRAMEWORK_VERSION),1.0)
31 LOCAL_MCS_FLAGS += -nowarn:414
32 endif
33
34 TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe
35
36 EXTRA_DISTFILES = \
37         corlib.dll.win32-excludes               \
38         Test/ms_run_test.sh                     \
39         Test/resources/MyResources.resources    \
40         Test/resources/MyResources.de.resources \
41         Test/resources/Empty.resources          \
42         Test/resources/AFile.txt                \
43         Test/resources/StreamTest.resources     \
44         Test/resources/StreamTest.ja.resources  \
45         Test/resources/bug81759.resources       \
46         $(RESOURCE_FILES)
47
48 include $(topdir)/build/library.make
49
50 ifdef FIXME_CORLIB_CMP
51 # corlib_cmp
52 cmplib = $(topdir)/class/lib/$(PROFILE)/corlib_cmp.dll
53 cmppdb = $(cmplib:.dll=.pdb)
54 cmp_response = $(depsdir)/$(PROFILE)_corlib_cmp.dll.response
55 cmp_makefrag = $(depsdir)/$(PROFILE)_corlib_cmp.dll.makefrag
56 cmp_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
57
58 EXTRA_DISTFILES += corlib_cmp.dll.excludes
59 CLEAN_FILES += $(cmplib) $(cmp_response) $(cmp_makefrag) $(cmppdb)
60
61 $(cmplib): $(cmp_makefrag) $(cmp_response)
62         $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(cmp_flags) -target:library -out:$@ @$(cmp_response)
63
64 $(cmp_response): $(sourcefile) corlib_cmp.dll.excludes
65         @echo Creating $@ ...
66         @sort $(sourcefile) corlib_cmp.dll.excludes | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
67
68 $(cmp_makefrag): $(cmp_response)
69         @echo Creating $@ ...
70         @sed 's,^,$(cmplib): ,' $< >$@
71
72 # Since we make corlib_cmp on demand, there isn't a real need
73 # to have full dep tracking for it. Also, the generation of this
74 # file is busted on Win32 ('sort' seems to mess up line endings),
75 # leading to a broken build.
76 #
77 # -include $(cmp_makefrag)
78
79 $(cmp_response) $(cmp_makefrag): Makefile $(depsdir)/.stamp
80 endif