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