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