Fix typo, there is no profile called 'xammaci'.
[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_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 \
23         $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
24
25 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
26 TEST_MCS_FLAGS += -r:System.Configuration
27 PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monodroid xammac mobile mobile_static, $(PROFILE))
28
29 ifeq (2.1, $(FRAMEWORK_VERSION))
30 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
31 endif
32 ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
33 LIB_MCS_FLAGS += -d:SECURITY_DEP
34 endif
35 ifeq (monodroid, $(PROFILE))
36 LIB_MCS_FLAGS += -d:SECURITY_DEP
37 endif
38 ifndef PROFILE_ANY_MOBILE
39 FINAL_MCS_FLAGS = -r:System.Configuration.dll -d:CONFIGURATION_DEP
40 endif
41
42 #
43 # Flags used to build the secxml version of System.
44 #
45 ifeq (secxml/, $(intermediate))
46 LOCAL_MCS_FLAGS = -lib:$(bare_libdir) 
47 LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(bare_libdir)/System.dll -r:System.Xml.dll -r:MonoSecurity=Mono.Security.dll
48 endif
49
50 #
51 # Flags used to build the final version of System (when intermediate is not defined)
52 #
53 ifndef intermediate
54 LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(secxml_libdir)/System.dll -r:System.Xml.dll -r:MonoSecurity=Mono.Security.dll $(FINAL_MCS_FLAGS)
55 endif
56
57 EXTRA_DISTFILES = \
58         System.Text.RegularExpressions/notes.txt        \
59         System.ComponentModel.Design/Changelog          \
60         Test/test-config-file                           \
61         Test/test-config-file-net-2.0                   \
62         Test/System.Security.Cryptography.X509Certificates/pkits/ChangeLog      \
63         Test/System.Security.Cryptography.X509Certificates/pkits/Makefile       \
64         Test/System.Security.Cryptography.X509Certificates/pkits/README         \
65         Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs   \
66         $(RESOURCE_FILES)                               \
67         $(TEST_RESOURCES)
68
69 include ../../build/library.make
70
71 system_library_deps := \
72         $(secxml_libdir)/System.dll             \
73         $(the_libdir_base)System.Xml.dll        \
74         $(the_libdir_base)Mono.Security.dll     \
75         $(bare_libdir)/System.dll
76
77 ifndef PROFILE_ANY_MOBILE
78 system_library_deps += $(the_libdir_base)System.Configuration.dll       
79 endif
80
81 artifacts = $(system_library_deps)                      \
82         $(bare_libdir)/System.Xml.dll                   \
83         $(the_libdir_base)Mono.Security.dll             \
84         $(the_libdir_base)System.Configuration.dll
85
86 .NOTPARALLEL: $(system_library_deps)
87
88 $(the_libdir_base)System.dll: $(system_library_deps) 
89
90 ifeq (bare/,$(intermediate))
91 build-bare:
92 else
93 $(bare_libdir)/System.dll:
94         $(MAKE) intermediate=bare/ $(bare_libdir)/System.dll
95 endif
96
97 ifneq (secxml/,$(intermediate))
98 $(secxml_libdir)/System.dll: $(bare_libdir)/System.dll $(bare_libdir)/System.Xml.dll $(the_libdir_base)Mono.Security.dll $(bare_libdir)/System.dll
99         $(MAKE) intermediate=secxml/ $(secxml_libdir)/System.dll
100 else
101 build-sec:
102 endif
103
104 $(the_libdir_base)System.Xml.dll:
105         (cd ../System.XML; $(MAKE) $@)
106
107 $(bare_libdir)/System.Xml.dll:
108         (cd ../System.XML; $(MAKE) $@)
109
110 $(the_libdir_base)Mono.Security.dll:
111         (cd ../Mono.Security; $(MAKE))
112
113 $(the_libdir_base)System.Configuration.dll:
114         (cd ../System.Configuration; $(MAKE))
115
116 $(build_lib): $(CYCLIC_DEP_FILES)
117
118 $(test_lib): $(test_lib).config $(TEST_RESOURCES)
119
120 ifeq (net_2_0, $(PROFILE))
121 $(test_lib).config: Test/test-config-file-net-2.0
122         cp $< $@
123 else
124 $(test_lib).config: Test/test-config-file
125         cp $< $@
126 endif
127
128 CLEAN_FILES = $(test_lib).config $(bare_libdir)/System.dll $(secxml_libdir)/System.dll $(bare_libdir)/System.dll.mdb $(secxml_libdir)/System.dll.mdb
129
130 # run the PKITS tests only if the data was installed/activated, otherwise ignore them
131 ifeq (net_2_0, $(PROFILE))
132 pkits_files := $(wildcard Test/System.Security.Cryptography.X509Certificates/pkits/hint)
133 ifndef pkits_files
134 TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess,PKITS
135 TEST_HARNESS_EXCLUDES_ONDOTNET = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotDotNet,CAS,PKITS
136 endif
137 endif
138
139 # Helper target to run the perl regex test suite
140 regex-check:
141         $(MAKE) check FIXTURE=System.Text.RegularExpressions.PerlTest
142
143 #Debuging target
144 fresh: clean
145         rm -rf ../../class/lib/$(PROFILE)/bare ../../class/lib/$(PROFILE)/bare/ $(system_library_deps)
146
147 ifndef intermediate
148 ifneq ($(PROFILE),basic)
149 csproj-local:
150         $(MAKE) csproj-local intermediate=bare/
151         $(MAKE) csproj-local intermediate=secxml/
152 endif
153 endif