Merge pull request #836 from madewokherd/buildfixes
[mono.git] / mcs / class / System / Makefile
index 583ea7cf6efded3486bb4f607948fd224b662d44..3b25daa8977eecc2a4328aae9fd5dff0971002d1 100644 (file)
@@ -20,13 +20,23 @@ 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 -nowarn:1595 -nowarn:0618 -nowarn:219 -nowarn:67 -nowarn:169 -nowarn:612 \
+TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -r:System.Data -r:System.Xml.dll -r:System.Core.dll -nowarn:618,672,219,67,169,612 \
        $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
 
 ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
 TEST_MCS_FLAGS += -r:System.Configuration
-PROFILE_2_OR_4 := $(filter net_2_0 net_4_0, $(PROFILE))        
+PROFILE_ANY_MOBILE := $(filter monotouch monodroid, $(PROFILE))
+NOT_SL := $(filter net_2_0 net_4_0 net_4_5 monotouch_runtime monodroid mobile, $(PROFILE))
+endif
+ifeq (2.1, $(FRAMEWORK_VERSION))
+LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
+ifeq (moonlight_raw, $(PROFILE))
+LIB_MCS_FLAGS += -d:SECURITY_DEP
+endif
+endif
+ifeq (monotouch, $(PROFILE))
+LIB_MCS_FLAGS += -d:SECURITY_DEP
 endif
 
 EXTRA_DISTFILES = \
@@ -43,20 +53,18 @@ EXTRA_DISTFILES = \
 
 lib_file := $(wildcard ../lib/$(PROFILE)/System.dll)
 ifdef lib_file
-ifdef PROFILE_2_OR_4
+ifdef NOT_SL
 LIB_MCS_FLAGS += -r:PrebuiltSystem=$(lib_file)
 endif
 else
 USE_BOOT_COMPILE = yes
 endif
 
-ifeq (net_2_0, $(PROFILE))
-BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
-endif
-
 ifdef USE_BOOT_COMPILE
+ifndef PROFILE_MCS_HAS_BOOTSTRAP_FALLBACK
 LIBRARY_COMPILE = $(BOOT_COMPILE)
 endif
+endif
 
 # Because System.dll, Mono.Security.dll System.Xml.dll have a cyclic dependency, we need a two-pass build.
 # 1st pass - build System.dll without System.Xml.dll or Mono.Security.dll or System.Configuration.dll references
@@ -90,7 +98,7 @@ endif
 
 endif
 
-ifdef PROFILE_2_OR_4
+ifdef NOT_SL
 # $(eval $(call cyclic-dep,Mono.Security.dll,SECURITY_DEP))
 CYCLIC_DEPS += Mono.Security.dll
 ifndef USE_BOOT_COMPILE
@@ -98,9 +106,10 @@ FILE_SECURITY_DEP := $(wildcard ../lib/$(PROFILE)/Mono.Security.dll)
 endif
 ifdef FILE_SECURITY_DEP
 CYCLIC_DEP_FILES += $(FILE_SECURITY_DEP)
-LIB_MCS_FLAGS += -d:SECURITY_DEP -r:Mono.Security.dll
+LIB_MCS_FLAGS += -d:SECURITY_DEP -r:MonoSecurity=Mono.Security.dll
 endif
 
+ifndef PROFILE_ANY_MOBILE
 # $(eval $(call cyclic-dep,System.Configuration.dll,CONFIGURATION_DEP))
 CYCLIC_DEPS += System.Configuration.dll
 ifndef USE_BOOT_COMPILE
@@ -110,6 +119,7 @@ ifdef FILE_CONFIGURATION_DEP
 CYCLIC_DEP_FILES += $(FILE_CONFIGURATION_DEP)
 LIB_MCS_FLAGS += -d:CONFIGURATION_DEP -r:System.Configuration.dll
 endif
+endif
 
 endif