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