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