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