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