Merge pull request #4431 from vkargov/vk-leaking-points
[mono.git] / mcs / class / System / Makefile
1 thisdir = class/System
2 SUBDIRS =
3 include ../../build/rules.make
4 export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/lib/$(PROFILE)
5
6 LIBRARY = System.dll
7
8 ifneq (2.1, $(FRAMEWORK_VERSION))
9 RESOURCE_FILES = \
10         resources/Asterisk.wav  \
11         resources/Beep.wav      \
12         resources/Exclamation.wav       \
13         resources/Hand.wav      \
14         resources/Question.wav
15 endif
16
17 TEST_RESOURCES = \
18         Test/System/test-uri-props.txt \
19         Test/System/test-uri-props-manual.txt \
20         Test/System/test-uri-relative-props.txt
21
22 LIB_MCS_FLAGS = -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%) -nowarn:436
23
24 ifndef NO_MONO_SECURITY
25 MONO_SECURITY=Mono.Security
26 MONO_SECURITY_REF=MonoSecurity=Mono.Security
27 MONO_SECURITY_DLL=$(the_libdir_base)Mono.Security.dll
28 EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS
29 else
30 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
31 endif
32
33 ifndef MOBILE_PROFILE
34 LIB_MCS_FLAGS += -d:CODEDOM
35 TEST_LIB_REFS = System.Drawing $(MONO_SECURITY) System.Data System.Xml System.Core System.Configuration
36 else
37 LIB_MCS_FLAGS += -nowarn:618
38 TEST_LIB_REFS = $(MONO_SECURITY) System.Data System.Xml System.Core
39 endif
40
41 TEST_MCS_FLAGS = -nowarn:618,672,219,67,169,612 \
42         $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
43
44 TEST_NUNITLITE_APP_CONFIG_GLOBAL=Test/test-config-file
45
46 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
47 ifndef NO_PROCESS_START
48 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
49 TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
50 endif
51
52 ifndef PROFILE_DISABLE_BTLS
53 ifdef HAVE_BTLS
54
55 LIB_MCS_FLAGS += -d:MONO_FEATURE_BTLS
56
57 endif
58 endif
59
60 ifndef NO_THREAD_ABORT
61 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
62 TEST_MCS_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
63 endif
64
65 ifndef NO_THREAD_SUSPEND_RESUME
66 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
67 TEST_MCS_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
68 endif
69
70 ifndef NO_MULTIPLE_APPDOMAINS
71 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
72 TEST_MCS_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
73 endif
74
75 TXT_RESOURCE_STRINGS = ../referencesource/System/System.txt
76
77 #
78 # Flags used to build the secxml version of System.
79 #
80 ifeq (secxml/, $(intermediate))
81 LOCAL_MCS_FLAGS =
82 LIB_REFS += bare/System.Xml $(MONO_SECURITY_REF)
83 LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP $(EXTERN_ALIAS_FLAGS)
84 endif
85
86 #
87 # Flags used to build the final version of System (when intermediate is not defined)
88 #
89 ifndef intermediate
90 LIB_REFS += System.Xml $(MONO_SECURITY_REF)
91 LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP $(EXTERN_ALIAS_FLAGS)
92
93 ifndef MOBILE_PROFILE
94 LIB_REFS += System.Configuration
95 LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
96 endif
97
98 endif
99
100 EXTRA_DISTFILES = \
101         common.sources                                  \
102         Test/test-config-file                           \
103         Test/System.Security.Cryptography.X509Certificates/pkits/Makefile       \
104         Test/System.Security.Cryptography.X509Certificates/pkits/README         \
105         Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs   \
106         $(RESOURCE_FILES)                               \
107         $(TEST_RESOURCES)
108
109 include ../../build/library.make
110
111 system_library_deps := \
112         $(secxml_libdir)/System.dll             \
113         $(the_libdir_base)System.Xml.dll        \
114         $(MONO_SECURITY_DLL)                            \
115         $(bare_libdir)/System.dll
116
117 ifndef MOBILE_PROFILE
118 system_library_deps += $(the_libdir_base)System.Configuration.dll       
119 endif
120
121 artifacts = $(system_library_deps)                      \
122         $(bare_libdir)/System.Xml.dll                   \
123         $(MONO_SECURITY_DLL)                            \
124         $(the_libdir_base)System.Configuration.dll
125
126 .NOTPARALLEL: $(system_library_deps)
127
128 $(the_libdir_base)System.dll: $(system_library_deps) ../Mono.Security/Makefile
129
130 ifeq (bare/,$(intermediate))
131 build-bare:
132 else
133 $(bare_libdir)/System.dll:
134         $(MAKE) intermediate=bare/ $(bare_libdir)/System.dll
135 endif
136
137 ifneq (secxml/,$(intermediate))
138 $(secxml_libdir)/System.dll: $(bare_libdir)/System.dll $(bare_libdir)/System.Xml.dll $(MONO_SECURITY_DLL) $(bare_libdir)/System.dll
139         $(MAKE) intermediate=secxml/ $(secxml_libdir)/System.dll
140 else
141 build-sec:
142 endif
143
144 $(the_libdir_base)System.Xml.dll:
145         (cd ../System.XML; $(MAKE) $@)
146
147 $(bare_libdir)/System.Xml.dll:
148         (cd ../System.XML; $(MAKE) $@)
149
150 $(the_libdir_base)Mono.Security.dll: ../Mono.Security/Makefile
151         (cd ../Mono.Security; $(MAKE))
152
153 $(the_libdir_base)System.Configuration.dll:
154         (cd ../System.Configuration; $(MAKE))
155
156 $(build_lib): $(CYCLIC_DEP_FILES)
157
158 $(test_lib): $(TEST_RESOURCES)
159
160 CLEAN_FILES = $(test_lib).config $(bare_libdir)/System.dll $(secxml_libdir)/System.dll $(bare_libdir)/System.dll.mdb $(secxml_libdir)/System.dll.mdb
161
162 # Helper target to run the perl regex test suite
163 regex-check:
164         $(MAKE) check FIXTURE=System.Text.RegularExpressions.PerlTest
165
166 #Debuging target
167 fresh: clean
168         rm -rf ../../class/lib/$(PROFILE)/bare ../../class/lib/$(PROFILE)/bare/ $(system_library_deps)
169
170 ifndef intermediate
171 ifneq ($(PROFILE),basic)
172 csproj-local:
173         $(MAKE) csproj-local intermediate=bare/
174         $(MAKE) csproj-local intermediate=secxml/
175 endif
176 endif