[build] Roslyn switch
[mono.git] / mcs / class / Makefile
1 thisdir = class
2
3 pcl_facade_dirs := Facades
4
5 # The minimal set of csc dependencies
6 basic_SUBDIRS := \
7         corlib \
8         Mono.Security \
9         System \
10         System.XML \
11         System.Core \
12         System.ComponentModel.Composition.4.5 \
13         System.Numerics \
14         System.Xml.Linq \
15         Mono.Cecil \
16         $(pcl_facade_dirs) \
17         ../tools/cil-stringreplacer
18
19 # resgen is corlib specific so we need to wait until corlib is build
20 # and build it just a step before first dll needs it
21 resgen_dir = ../tools/resgen
22
23 build_SUBDIRS :=  \
24         corlib \
25         Mono.Security \
26         System \
27         System.XML \
28         Mono.Posix \
29         System.Core \
30         System.ComponentModel.Composition.4.5 \
31         System.Numerics \
32         System.Xml.Linq \
33         Mono.Cecil \
34         $(pcl_facade_dirs) \
35         ../tools/cil-stringreplacer
36
37 mobile_common_dirs := \
38         corlib  \
39         Mono.Security \
40         System  \
41         System.Core     \
42         System.Security \
43         System.XML      \
44         I18N            \
45         System.ServiceModel.Internals   \
46         System.Runtime.Serialization    \
47         System.Xml.Linq \
48         System.IdentityModel            \
49         System.ServiceModel     \
50         System.ServiceModel.Web \
51         System.Json     \
52         System.Web.Services     \
53         Mono.Data.Tds   \
54         System.Transactions     \
55         System.Numerics \
56         System.Numerics.Vectors         \
57         System.Data     \
58         Mono.Data.Sqlite        \
59         System.Data.Services.Client \
60         System.IO.Compression \
61         System.IO.Compression.FileSystem \
62         System.ComponentModel.DataAnnotations \
63         System.ComponentModel.Composition.4.5 \
64         System.Net \
65         System.Net.Http \
66         System.Windows \
67         System.Xml.Serialization \
68         Mono.CSharp     \
69         Microsoft.CSharp \
70         System.Runtime.InteropServices.RuntimeInformation       \
71         System.Reflection.DispatchProxy \
72         System.Xml.XPath.XmlDocument \
73         System.Reflection.Context       \
74         System.Net.Http.WinHttpHandler
75
76 aot_only_dirs := \
77         $(mobile_common_dirs)   \
78         Mono.Dynamic.Interpreter        \
79         PEAPI   \
80         Mono.CompilerServices.SymbolWriter      \
81         Mono.Simd                       \
82         $(pcl_facade_dirs)
83
84 aot_hybrid_dirs := \
85         $(mobile_common_dirs)   \
86         PEAPI   \
87         Mono.CompilerServices.SymbolWriter      \
88         Mono.Simd                       \
89         $(pcl_facade_dirs)
90
91 xammac_dirs := \
92         $(mobile_common_dirs)   \
93         Mono.CompilerServices.SymbolWriter      \
94         $(pcl_facade_dirs)
95
96 monodroid_dirs := \
97         $(mobile_common_dirs)   \
98         Mono.CompilerServices.SymbolWriter      \
99         Mono.Btls.Interface     \
100         $(pcl_facade_dirs)
101
102 monotouch_dirs := \
103         $(aot_only_dirs)
104
105 monotouch_watch_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_dirs))
106 monotouch_tv_dirs   := $(monotouch_dirs)
107
108 monotouch_runtime_dirs := \
109         corlib \
110         Mono.Security \
111         System \
112         System.Core \
113         System.XML \
114         Mono.CSharp
115
116 monotouch_watch_runtime_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_runtime_dirs))
117 monotouch_tv_runtime_dirs := $(monotouch_runtime_dirs)
118
119 xammac_4_5_dirs := \
120         corlib  \
121         Mono.Security \
122         System  \
123         Mono.Posix                      \
124         System.Core     \
125         System.Security                 \
126         System.XML      \
127         I18N            \
128         System.ServiceModel.Internals   \
129         SMDiagnostics   \
130         System.Numerics \
131         System.Numerics.Vectors         \
132         Mono.Data.Tds   \
133         System.Transactions     \
134         System.EnterpriseServices       \
135         System.Data     \
136         System.Runtime.Serialization    \
137         System.Xml.Linq \
138         Mono.Data.Sqlite        \
139         System.Runtime.Serialization.Formatters.Soap \
140         System.ComponentModel.DataAnnotations \
141         System.IdentityModel            \
142         System.IdentityModel.Selectors  \
143         Mono.Messaging                  \
144         System.Configuration.Install    \
145         System.Messaging                \
146         System.Web.Services \
147         System.ServiceModel     \
148         System.ServiceModel.Web \
149         System.Json     \
150         System.Data.Services.Client \
151         System.IO.Compression \
152         System.IO.Compression.FileSystem \
153         System.ComponentModel.Composition.4.5 \
154         System.Net \
155         System.Windows \
156         System.Xml.Serialization \
157         Mono.CSharp     \
158         Microsoft.CSharp \
159         Mono.CompilerServices.SymbolWriter      \
160         System.Data.Linq                \
161         System.Net.Http \
162         System.Net.Http.WebRequest \
163         System.Runtime.InteropServices.RuntimeInformation \
164         System.Reflection.Context       \
165         System.Net.Http.WinHttpHandler  \
166         $(pcl_facade_dirs)
167
168 net_4_x_dirs := \
169         corlib                          \
170         Mono.Security \
171         System                          \
172         System.XML                      \
173         Mono.CompilerServices.SymbolWriter \
174         Mono.Posix                      \
175         System.Core                     \
176         System.Security                 \
177         System.Configuration    \
178         $(resgen_dir)                   \
179         System.IO.Compression           \
180         System.IO.Compression.FileSystem \
181         System.Drawing                  \
182         System.Transactions             \
183         System.EnterpriseServices       \
184         Mono.Data.Tds                   \
185         System.Numerics         \
186         System.Numerics.Vectors         \
187         System.Data                     \
188         System.ComponentModel.DataAnnotations   \
189         Accessibility                   \
190         Mono.WebBrowser                 \
191         System.Runtime.Serialization.Formatters.Soap \
192         System.Windows.Forms            \
193         Mono.Data.Sqlite                \
194         System.Web.ApplicationServices  \
195         Novell.Directory.Ldap           \
196         System.DirectoryServices        \
197         System.Web                      \
198         System.Web.Services             \
199         System.Design                   \
200         System.Runtime.Remoting         \
201         System.Configuration.Install    \
202         System.Management               \
203         System.Data.OracleClient        \
204         Cscompmgd                       \
205         Commons.Xml.Relaxng             \
206         Mono.Messaging                  \
207         System.Messaging                \
208         System.ServiceProcess           \
209         System.Drawing.Design           \
210         ICSharpCode.SharpZipLib         \
211         IBM.Data.DB2                    \
212         CustomMarshalers                \
213         SystemWebTestShim                       \
214         System.ServiceModel.Internals   \
215         SMDiagnostics   \
216         System.Runtime.Serialization    \
217         System.Xml.Linq                 \
218         System.Data.Linq                \
219         System.Web.Abstractions         \
220         System.Web.Routing              \
221         System.Runtime.DurableInstancing \
222         System.IdentityModel            \
223         System.IdentityModel.Selectors  \
224         System.ServiceModel             \
225         System.Web.Extensions           \
226         System.Web.Extensions.Design    \
227         System.Web.DynamicData          \
228         Mono.CSharp                     \
229         System.Net                      \
230         System.Json             \
231         Microsoft.CSharp        \
232         System.Xaml \
233         WindowsBase \
234         System.ServiceModel.Activation \
235         System.ServiceModel.Routing \
236         System.ServiceModel.Discovery \
237         System.Runtime.Caching \
238         Microsoft.Web.Infrastructure \
239         System.ServiceModel.Web \
240         System.Net.Http \
241         System.Net.Http.WebRequest \
242         System.Web.Razor \
243         System.Web.WebPages.Deployment \
244         System.Web.WebPages \
245         System.Web.WebPages.Razor \
246         System.Web.Mvc3 \
247         System.Net.Http.Formatting \
248         System.Web.Http \
249         System.Web.Http.SelfHost \
250         System.Web.Http.WebHost \
251         System.Runtime.InteropServices.RuntimeInformation
252
253 # These are the subdirs which depends on libs in net_4_x_dirs
254 # or have proper dependencies between each other
255 net_4_x_parallel_dirs := \
256         PEAPI                           \
257         I18N                            \
258         Mono.Btls.Interface             \
259         Mono.Http                       \
260         Mono.Cairo                      \
261         Mono.Cecil                      \
262         Mono.Cecil.Mdb                  \
263         Mono.Debugger.Soft              \
264         Mono.C5                         \
265         Mono.Management                 \
266         Mono.Options                    \
267         Mono.Simd                       \
268         Mono.Tasklets                   \
269         Mono.CodeContracts \
270         Mono.Parallel \
271         Mono.Security.Win32             \
272         Mono.Messaging.RabbitMQ         \
273         System.Dynamic                  \
274         System.Windows.Forms.DataVisualization  \
275         System.Reactive.Interfaces \
276         System.Reactive.Core \
277         System.Reactive.Linq \
278         System.Reactive.PlatformServices \
279         System.Reactive.Providers \
280         System.Reactive.Runtime.Remoting \
281         System.Reactive.Windows.Forms \
282         System.Reactive.Windows.Threading \
283         System.Reactive.Observable.Aliases \
284         System.Reactive.Experimental \
285         System.Reactive.Debugger \
286         System.Data.Services.Client     \
287         System.Data.Services \
288         System.Data.Entity \
289         System.Data.DataSetExtensions   \
290         System.Json.Microsoft \
291         System.Threading.Tasks.Dataflow \
292         System.ComponentModel.Composition.4.5 \
293         System.Windows \
294         System.Xml.Serialization \
295         System.DirectoryServices.Protocols      \
296         RabbitMQ.Client                 \
297         Microsoft.VisualC               \
298         WebMatrix.Data \
299         monodoc \
300         System.Deployment \
301         System.Web.Mobile \
302         System.Web.RegularExpressions \
303         System.Workflow.Activities \
304         System.Workflow.ComponentModel \
305         System.Workflow.Runtime \
306         System.Reflection.Context \
307         legacy/Mono.Cecil \
308         $(pcl_facade_dirs)
309
310 xbuild_2_0_dirs := \
311         Microsoft.Build.Framework       \
312         Microsoft.Build.Utilities       \
313         Microsoft.Build.Engine          \
314         Mono.XBuild.Tasks               \
315         Microsoft.Build.Tasks
316
317 xbuild_4_0_dirs := \
318         $(xbuild_2_0_dirs)      \
319         Microsoft.Build
320
321 monodroid_SUBDIRS := $(monodroid_dirs)
322 monotouch_SUBDIRS := $(monotouch_dirs)
323 monotouch_watch_SUBDIRS := $(monotouch_watch_dirs)
324 monotouch_tv_SUBDIRS    := $(monotouch_tv_dirs)
325 monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
326 monotouch_watch_runtime_SUBDIRS := $(monotouch_watch_runtime_dirs)
327 monotouch_tv_runtime_SUBDIRS := $(monotouch_tv_runtime_dirs)
328 aot_only_SUBDIRS := $(aot_only_dirs)
329 aot_hybrid_SUBDIRS := $(aot_hybrid_dirs)
330 xammac_SUBDIRS := $(xammac_dirs)
331 xammac_net_4_5_SUBDIRS := $(xammac_4_5_dirs)
332 binary_reference_assemblies_SUBDIRS := reference-assemblies
333 net_4_x_SUBDIRS := $(net_4_x_dirs) $(xbuild_4_0_dirs)
334 net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs)
335 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
336 xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
337
338 include ../build/rules.make
339
340 SUBDIRS = $(aot_only_dirs) $(aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS)
341
342 DIST_ONLY_SUBDIRS = dlr aot-compiler reference-assemblies $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
343
344 # No new makefiles for: System.Messaging, System.Web.Mobile,
345 # System.ServiceProcess
346
347 DISTFILES = \
348         ecma.pub                \
349         winfx.pub               \
350         winfx3.pub              \
351         mono.pub                \
352         msfinal.pub             \
353         silverlight.pub         \
354         reactive.pub            \
355         mono.snk                \
356         LICENSE                 \
357         README                  \
358         doc/API-notes           \
359         doc/NUnitGuidelines     \
360         doc/TemplateTest.cs     \
361         notes/BitVecto32.txt    \
362         MicrosoftAjaxLibrary/License.htm        \
363         test-helpers/NetworkHelpers.cs  \
364         test-helpers/SocketResponder.cs \
365         $(monolite_files)
366
367 .PHONY: all-local $(STD_TARGETS:=-local)
368 all-local $(STD_TARGETS:=-local):
369         @:
370
371 all-local-aot:
372
373 monolite_dir := monolite
374
375 # Files needed to bootstrap C# compiler
376 build_files = mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll \
377         System.Numerics.dll System.Xml.Linq.dll \
378         Facades/System.Collections.Concurrent.dll Facades/System.Linq.dll Facades/System.Runtime.dll Facades/System.Collections.dll     \
379         Facades/System.Reflection.Extensions.dll Facades/System.Text.Encoding.Extensions.dll Facades/System.Diagnostics.Debug.dll \
380         Facades/System.Reflection.Primitives.dll Facades/System.Text.Encoding.dll Facades/System.Diagnostics.Tools.dll Facades/System.Reflection.dll \
381         Facades/System.Threading.Tasks.Parallel.dll Facades/System.Dynamic.Runtime.dll Facades/System.Resources.ResourceManager.dll \
382         Facades/System.Threading.Tasks.dll Facades/System.Globalization.dll Facades/System.Runtime.Extensions.dll Facades/System.Threading.dll \
383         Facades/System.IO.dll Facades/System.Runtime.InteropServices.dll Facades/System.Xml.ReaderWriter.dll Facades/System.Linq.Expressions.dll \
384         Facades/System.Runtime.Numerics.dll Facades/System.Xml.XDocument.dll
385
386 monolite_files = $(build_files:%=lib/$(monolite_dir)/%)
387
388 lib/$(monolite_dir):
389 lib/$(monolite_dir)/Facades:
390         $(MKINSTALLDIRS) $@
391
392 $(monolite_files): | lib/$(monolite_dir)
393 $(monolite_files): | lib/$(monolite_dir)/Facades
394 $(monolite_files): lib/$(monolite_dir)/%: lib/build/%
395         cp -p $< $@
396
397 $(build_files:%=lib/build/%):
398         cd $(topdir) && $(MAKE) profile-do--build--all NO_DIR_CHECK=1 SKIP_AOT=1
399
400 dist-monolite: $(monolite_files)
401
402 dist-default: dist-monolite
403
404 dist-local: dist-default
405
406 csproj-local:
407
408 do-clean:
409         $(RM) -rf $(topdir)/class/lib/$(PROFILE)