Sorry, nothing to see here
[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 LIBRARY_USE_INTERMEDIATE_FILE = yes
8
9 RESOURCE_FILES = \
10         resources/Asterisk.wav  \
11         resources/Beep.wav      \
12         resources/Exclamation.wav       \
13         resources/Hand.wav      \
14         resources/Question.wav
15
16 # Because System.dll, Mono.Security.dll System.Xml.dll have a cyclic dependency, we need a two-pass build.
17 # 1st pass - build System.dll without System.Xml.dll or Mono.Security.dll or System.Configuration.dll references
18 # 2nd pass - build System.dll with System.Xml.dll and Mono.Security.dll or System.Configuration.dll references
19
20 TEST_RESOURCES = \
21         Test/System/test-uri-props.txt \
22         Test/System/test-uri-props-manual.txt \
23         Test/System/test-uri-relative-props.txt
24
25 TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -nowarn:1595 -nowarn:0618 -nowarn:219 -nowarn:67 -nowarn:169 -nowarn:612 \
26         $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
27
28 XML_DEP := System.Xml.dll
29 XML_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(XML_DEP))
30 CYCLIC_DEPS := $(XML_DEP)
31 CYCLIC_DEP_FILES := $(XML_DEP_FILE)
32
33 ifeq (2.0, $(FRAMEWORK_VERSION))
34 # Happens on net_2_0_bootstrap and net_2_0 profiles
35 SECURITY_DEP := Mono.Security.dll
36 SECURITY_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(SECURITY_DEP))
37 CONFIGURATION_DEP := System.Configuration.dll
38 CONFIGURATION_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(CONFIGURATION_DEP))
39 CYCLIC_DEPS += $(SECURITY_DEP) $(CONFIGURATION_DEP)
40 CYCLIC_DEP_FILES += $(SECURITY_DEP_FILE) $(CONFIGURATION_DEP_FILE)
41 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
42 TEST_MCS_FLAGS += -r:System.Configuration
43 endif
44
45 EXTRA_DISTFILES = \
46         System.Text.RegularExpressions/notes.txt        \
47         System.ComponentModel.Design/Changelog          \
48         Test/test-config-file                           \
49         Test/System.Security.Cryptography.X509Certificates/pkits/ChangeLog      \
50         Test/System.Security.Cryptography.X509Certificates/pkits/Makefile       \
51         Test/System.Security.Cryptography.X509Certificates/pkits/README         \
52         Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs   \
53         $(RESOURCE_FILES)                               \
54         $(TEST_RESOURCES)
55
56 lib_file := $(wildcard ../lib/$(PROFILE)/System.dll)
57 ifndef lib_file
58 USE_BOOT_COMPILE = yes
59 endif
60
61 ifeq (net_2_0, $(PROFILE))
62 BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
63 endif
64
65 ifdef USE_BOOT_COMPILE
66 LIBRARY_COMPILE = $(BOOT_COMPILE)
67 endif
68
69 ifneq ($(CYCLIC_DEPS:%=../lib/$(PROFILE)/%), $(CYCLIC_DEP_FILES))
70 NO_SIGN_ASSEMBLY = yes
71 NO_INSTALL = yes
72 all-local: echo-warning
73 .PHONY: echo-warning
74
75 ifeq   (, $(strip $(CYCLIC_DEP_FILES)))
76 echo-warning:
77         @echo "** Warning: System.dll built without parts that depend on: $(CYCLIC_DEPS)"
78 else     # defined CYCLIC_DEP_FILES
79 ifdef      SECURITY_DEP_FILE
80 echo-warning:
81         @echo "** Warning: built System.dll with 'Mono.Security.dll'-dependent parts"
82         @echo "** Warning: ... without 'System.Xml.dll' present: it may not be usable"
83         @echo "** Warning: ... without 'System.Configuration.dll' present: it may not be usable"
84 else
85 echo-warning:
86         @echo "** Warning: System.dll built without parts that depend on Mono.Security.dll"
87 endif
88 endif
89 endif
90
91 include ../../build/library.make
92
93 ifdef XML_DEP_FILE
94 LIB_MCS_FLAGS += -define:XML_DEP -r:$(XML_DEP)
95 $(the_lib): $(XML_DEP_FILE)
96 endif
97
98 ifdef SECURITY_DEP_FILE
99 LIB_MCS_FLAGS += -define:SECURITY_DEP -r:Mono.Security.dll
100 $(the_lib): $(SECURITY_DEP_FILE)
101 endif
102
103 ifdef CONFIGURATION_DEP_FILE
104 LIB_MCS_FLAGS += -define:CONFIGURATION_DEP -r:$(CONFIGURATION_DEP) -r:PrebuiltSystem=$(topdir)/class/lib/$(PROFILE)/System.dll
105 $(the_lib): $(CONFIGURATION_DEP_FILE)
106 endif
107
108 $(test_lib): $(test_lib).config $(TEST_RESOURCES)
109
110 $(test_lib).config: Test/test-config-file
111         cp $< $@
112
113 CLEAN_FILES = $(test_lib).config
114
115 # run the PKITS tests only if the data was installed/activated, otherwise ignore them
116 ifeq (net_2_0, $(PROFILE))
117 pkits_files := $(wildcard Test/System.Security.Cryptography.X509Certificates/pkits/hint)
118 ifndef pkits_files
119 TEST_HARNESS_EXCLUDES = /exclude:NotWorking,ValueAdd,CAS,InetAccess,PKITS
120 TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:NotDotNet,CAS,PKITS
121 endif
122 endif