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