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