[System*] Throw a PlatformNotSupported exception when using the managed networking...
[mono.git] / mcs / class / System / Makefile
index 25031265acc6825dabdb97cc1350dabdce1a4215..fdfb7c293a4ecd9d2bff6567df57c55c2a693683 100644 (file)
@@ -19,7 +19,19 @@ TEST_RESOURCES = \
        Test/System/test-uri-props-manual.txt \
        Test/System/test-uri-relative-props.txt
 
-TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -r:System.Data.dll -r:System.Xml.dll -r:System.Core.dll -nowarn:618,672,219,67,169,612 \
+ifndef NO_MONO_SECURITY
+MONO_SECURITY=Mono.Security
+MONO_SECURITY_REF=MonoSecurity=Mono.Security
+MONO_SECURITY_DLL=$(the_libdir_base)Mono.Security.dll
+endif
+
+ifndef MOBILE_PROFILE
+TEST_LIB_REFS = System.Drawing $(MONO_SECURITY) System.Data System.Xml System.Core System.Configuration
+else
+TEST_LIB_REFS = $(MONO_SECURITY) System.Data System.Xml System.Core
+endif
+
+TEST_MCS_FLAGS = -nowarn:618,672,219,67,169,612 \
        $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
 
 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
@@ -29,7 +41,6 @@ TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
 endif
 
 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
-TEST_MCS_FLAGS += -r:System.Configuration.dll
 
 ifndef NO_THREAD_ABORT
 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
@@ -41,7 +52,12 @@ REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
 TEST_MCS_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
 endif
 
-TXT_RESOURCE_STRINGS = ../../../external/referencesource/System/System.txt
+ifndef NO_MULTIPLE_APPDOMAINS
+REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
+TEST_MCS_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
+endif
+
+TXT_RESOURCE_STRINGS = ../referencesource/System/System.txt
 
 #
 # MOBILE_PROFILE needs SECURITY_DEP
@@ -49,25 +65,30 @@ TXT_RESOURCE_STRINGS = ../../../external/referencesource/System/System.txt
 ifdef MOBILE_PROFILE
 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM -d:SECURITY_DEP
 else
-EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS -d:MONO_X509_ALIAS
-FINAL_MCS_FLAGS = -r:System.Configuration.dll -d:CONFIGURATION_DEP
+EXTERN_ALIAS_FLAGS = -d:MONO_SECURITY_ALIAS
 endif
 
 #
 # Flags used to build the secxml version of System.
 #
 ifeq (secxml/, $(intermediate))
-LOCAL_MCS_FLAGS = -lib:$(bare_libdir) 
-LIB_REFS += System.Xml MonoSecurity=Mono.Security
-LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(bare_libdir)/System.dll $(EXTERN_ALIAS_FLAGS)
+LOCAL_MCS_FLAGS =
+LIB_REFS += bare/System.Xml $(MONO_SECURITY_REF)
+LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP $(EXTERN_ALIAS_FLAGS)
 endif
 
 #
 # Flags used to build the final version of System (when intermediate is not defined)
 #
 ifndef intermediate
-LIB_REFS += System.Xml MonoSecurity=Mono.Security
-LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(secxml_libdir)/System.dll $(EXTERN_ALIAS_FLAGS) $(FINAL_MCS_FLAGS)
+LIB_REFS += System.Xml $(MONO_SECURITY_REF)
+LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP $(EXTERN_ALIAS_FLAGS)
+
+ifndef MOBILE_PROFILE
+LIB_REFS += System.Configuration
+LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
+endif
+
 endif
 
 EXTRA_DISTFILES = \
@@ -84,7 +105,7 @@ include ../../build/library.make
 system_library_deps := \
        $(secxml_libdir)/System.dll             \
        $(the_libdir_base)System.Xml.dll        \
-       $(the_libdir_base)Mono.Security.dll     \
+       $(MONO_SECURITY_DLL)                            \
        $(bare_libdir)/System.dll
 
 ifndef MOBILE_PROFILE
@@ -93,7 +114,7 @@ endif
 
 artifacts = $(system_library_deps)                     \
        $(bare_libdir)/System.Xml.dll                   \
-       $(the_libdir_base)Mono.Security.dll             \
+       $(MONO_SECURITY_DLL)                            \
        $(the_libdir_base)System.Configuration.dll
 
 .NOTPARALLEL: $(system_library_deps)
@@ -108,7 +129,7 @@ $(bare_libdir)/System.dll:
 endif
 
 ifneq (secxml/,$(intermediate))
-$(secxml_libdir)/System.dll: $(bare_libdir)/System.dll $(bare_libdir)/System.Xml.dll $(the_libdir_base)Mono.Security.dll $(bare_libdir)/System.dll
+$(secxml_libdir)/System.dll: $(bare_libdir)/System.dll $(bare_libdir)/System.Xml.dll $(MONO_SECURITY_DLL) $(bare_libdir)/System.dll
        $(MAKE) intermediate=secxml/ $(secxml_libdir)/System.dll
 else
 build-sec: