[System*] Throw a PlatformNotSupported exception when using the managed networking...
[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 ifndef NO_MONO_SECURITY
23 MONO_SECURITY=Mono.Security
24 MONO_SECURITY_REF=MonoSecurity=Mono.Security
25 MONO_SECURITY_DLL=$(the_libdir_base)Mono.Security.dll
26 endif
27
28 ifndef MOBILE_PROFILE
29 TEST_LIB_REFS = System.Drawing $(MONO_SECURITY) System.Data System.Xml System.Core System.Configuration
30 else
31 TEST_LIB_REFS = $(MONO_SECURITY) System.Data System.Xml System.Core
32 endif
33
34 TEST_MCS_FLAGS = -nowarn:618,672,219,67,169,612 \
35         $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
36
37 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
38 ifndef NO_PROCESS_START
39 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
40 TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
41 endif
42
43 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
44
45 ifndef NO_THREAD_ABORT
46 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
47 TEST_MCS_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
48 endif
49
50 ifndef NO_THREAD_SUSPEND_RESUME
51 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
52 TEST_MCS_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
53 endif
54
55 ifndef NO_MULTIPLE_APPDOMAINS
56 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
57 TEST_MCS_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
58 endif
59
60 TXT_RESOURCE_STRINGS = ../referencesource/System/System.txt
61
62 #
63 # MOBILE_PROFILE needs SECURITY_DEP
64 #
65 ifdef MOBILE_PROFILE
66 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM -d:SECURITY_DEP
67 else
68 EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS
69 endif
70
71 #
72 # Flags used to build the secxml version of System.
73 #
74 ifeq (secxml/, $(intermediate))
75 LOCAL_MCS_FLAGS =
76 LIB_REFS += bare/System.Xml $(MONO_SECURITY_REF)
77 LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP $(EXTERN_ALIAS_FLAGS)
78 endif
79
80 #
81 # Flags used to build the final version of System (when intermediate is not defined)
82 #
83 ifndef intermediate
84 LIB_REFS += System.Xml $(MONO_SECURITY_REF)
85 LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP $(EXTERN_ALIAS_FLAGS)
86
87 ifndef MOBILE_PROFILE
88 LIB_REFS += System.Configuration
89 LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
90 endif
91
92 endif
93
94 EXTRA_DISTFILES = \
95         Test/test-config-file                           \
96         Test/test-config-file-net-2.0                   \
97         Test/System.Security.Cryptography.X509Certificates/pkits/Makefile       \
98         Test/System.Security.Cryptography.X509Certificates/pkits/README         \
99         Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs   \
100         $(RESOURCE_FILES)                               \
101         $(TEST_RESOURCES)
102
103 include ../../build/library.make
104
105 system_library_deps := \
106         $(secxml_libdir)/System.dll             \
107         $(the_libdir_base)System.Xml.dll        \
108         $(MONO_SECURITY_DLL)                            \
109         $(bare_libdir)/System.dll
110
111 ifndef MOBILE_PROFILE
112 system_library_deps += $(the_libdir_base)System.Configuration.dll       
113 endif
114
115 artifacts = $(system_library_deps)                      \
116         $(bare_libdir)/System.Xml.dll                   \
117         $(MONO_SECURITY_DLL)                            \
118         $(the_libdir_base)System.Configuration.dll
119
120 .NOTPARALLEL: $(system_library_deps)
121
122 $(the_libdir_base)System.dll: $(system_library_deps) ../Mono.Security/Makefile
123
124 ifeq (bare/,$(intermediate))
125 build-bare:
126 else
127 $(bare_libdir)/System.dll:
128         $(MAKE) intermediate=bare/ $(bare_libdir)/System.dll
129 endif
130
131 ifneq (secxml/,$(intermediate))
132 $(secxml_libdir)/System.dll: $(bare_libdir)/System.dll $(bare_libdir)/System.Xml.dll $(MONO_SECURITY_DLL) $(bare_libdir)/System.dll
133         $(MAKE) intermediate=secxml/ $(secxml_libdir)/System.dll
134 else
135 build-sec:
136 endif
137
138 $(the_libdir_base)System.Xml.dll:
139         (cd ../System.XML; $(MAKE) $@)
140
141 $(bare_libdir)/System.Xml.dll:
142         (cd ../System.XML; $(MAKE) $@)
143
144 $(the_libdir_base)Mono.Security.dll: ../Mono.Security/Makefile
145         (cd ../Mono.Security; $(MAKE))
146
147 $(the_libdir_base)System.Configuration.dll:
148         (cd ../System.Configuration; $(MAKE))
149
150 $(build_lib): $(CYCLIC_DEP_FILES)
151
152 $(test_lib): $(test_lib).config $(TEST_RESOURCES)
153
154 $(test_lib).config: Test/test-config-file
155         cp $< $@
156
157 CLEAN_FILES = $(test_lib).config $(bare_libdir)/System.dll $(secxml_libdir)/System.dll $(bare_libdir)/System.dll.mdb $(secxml_libdir)/System.dll.mdb
158
159 # Helper target to run the perl regex test suite
160 regex-check:
161         $(MAKE) check FIXTURE=System.Text.RegularExpressions.PerlTest
162
163 #Debuging target
164 fresh: clean
165         rm -rf ../../class/lib/$(PROFILE)/bare ../../class/lib/$(PROFILE)/bare/ $(system_library_deps)
166
167 ifndef intermediate
168 ifneq ($(PROFILE),basic)
169 csproj-local:
170         $(MAKE) csproj-local intermediate=bare/
171         $(MAKE) csproj-local intermediate=secxml/
172 endif
173 endif