Merge pull request #1542 from ninjarobot/UriTemplateMatchException
[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 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
26 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%)
27 TEST_MCS_FLAGS += -r:System.Configuration
28 PROFILE_ANY_MOBILE := $(filter monotouch monotouch_runtime monodroid xammac mobile mobile_static, $(PROFILE))
29
30 ifeq (2.1, $(FRAMEWORK_VERSION))
31 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
32 endif
33 ifeq (monotouch, $(subst _runtime,,$(PROFILE)))
34 LIB_MCS_FLAGS += -d:SECURITY_DEP
35 endif
36 ifeq (monodroid, $(PROFILE))
37 LIB_MCS_FLAGS += -d:SECURITY_DEP
38 endif
39 ifndef PROFILE_ANY_MOBILE
40 FINAL_MCS_FLAGS = -r:System.Configuration.dll -d:CONFIGURATION_DEP
41 endif
42
43 #
44 # Flags used to build the secxml version of System.
45 #
46 ifeq (secxml/, $(intermediate))
47 LOCAL_MCS_FLAGS = -lib:$(bare_libdir) 
48 LIB_MCS_FLAGS += -d:SECURITY_DEP -d:XML_DEP -r:PrebuiltSystem=$(bare_libdir)/System.dll -r:System.Xml.dll -r:MonoSecurity=Mono.Security.dll
49 endif
50
51 #
52 # Flags used to build the final version of System (when intermediate is not defined)
53 #
54 ifndef intermediate
55 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)
56 endif
57
58 EXTRA_DISTFILES = \
59         Test/test-config-file                           \
60         Test/test-config-file-net-2.0                   \
61         Test/System.Security.Cryptography.X509Certificates/pkits/ChangeLog      \
62         Test/System.Security.Cryptography.X509Certificates/pkits/Makefile       \
63         Test/System.Security.Cryptography.X509Certificates/pkits/README         \
64         Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs   \
65         $(RESOURCE_FILES)                               \
66         $(TEST_RESOURCES)
67
68 include ../../build/library.make
69
70 system_library_deps := \
71         $(secxml_libdir)/System.dll             \
72         $(the_libdir_base)System.Xml.dll        \
73         $(the_libdir_base)Mono.Security.dll     \
74         $(bare_libdir)/System.dll
75
76 ifndef PROFILE_ANY_MOBILE
77 system_library_deps += $(the_libdir_base)System.Configuration.dll       
78 endif
79
80 artifacts = $(system_library_deps)                      \
81         $(bare_libdir)/System.Xml.dll                   \
82         $(the_libdir_base)Mono.Security.dll             \
83         $(the_libdir_base)System.Configuration.dll
84
85 .NOTPARALLEL: $(system_library_deps)
86
87 $(the_libdir_base)System.dll: $(system_library_deps) 
88
89 ifeq (bare/,$(intermediate))
90 build-bare:
91 else
92 $(bare_libdir)/System.dll:
93         $(MAKE) intermediate=bare/ $(bare_libdir)/System.dll
94 endif
95
96 ifneq (secxml/,$(intermediate))
97 $(secxml_libdir)/System.dll: $(bare_libdir)/System.dll $(bare_libdir)/System.Xml.dll $(the_libdir_base)Mono.Security.dll $(bare_libdir)/System.dll
98         $(MAKE) intermediate=secxml/ $(secxml_libdir)/System.dll
99 else
100 build-sec:
101 endif
102
103 $(the_libdir_base)System.Xml.dll:
104         (cd ../System.XML; $(MAKE) $@)
105
106 $(bare_libdir)/System.Xml.dll:
107         (cd ../System.XML; $(MAKE) $@)
108
109 $(the_libdir_base)Mono.Security.dll:
110         (cd ../Mono.Security; $(MAKE))
111
112 $(the_libdir_base)System.Configuration.dll:
113         (cd ../System.Configuration; $(MAKE))
114
115 $(build_lib): $(CYCLIC_DEP_FILES)
116
117 $(test_lib): $(test_lib).config $(TEST_RESOURCES)
118
119 $(test_lib).config: Test/test-config-file
120         cp $< $@
121
122 CLEAN_FILES = $(test_lib).config $(bare_libdir)/System.dll $(secxml_libdir)/System.dll $(bare_libdir)/System.dll.mdb $(secxml_libdir)/System.dll.mdb
123
124 # Helper target to run the perl regex test suite
125 regex-check:
126         $(MAKE) check FIXTURE=System.Text.RegularExpressions.PerlTest
127
128 #Debuging target
129 fresh: clean
130         rm -rf ../../class/lib/$(PROFILE)/bare ../../class/lib/$(PROFILE)/bare/ $(system_library_deps)
131
132 ifndef intermediate
133 ifneq ($(PROFILE),basic)
134 csproj-local:
135         $(MAKE) csproj-local intermediate=bare/
136         $(MAKE) csproj-local intermediate=secxml/
137 endif
138 endif