[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / class / Makefile
blob71972468932e6cb79bbb18eef081e1b4de696a50
1 thisdir = class
3 NO_FACADES_PROFILE := $(filter monodroid_tools monotouch_tools wasm_tools binary_reference_assemblies xbuild_12 xbuild_14 netcore, $(PROFILE))
5 ifndef NO_FACADES_PROFILE
6 FACADES_FOLDER := Facades
7 endif
9 -include ../build/config.make
11 ifdef MCS_MODE
12 MCS_MODE_dirs := Mono.Cecil.Mdb
13 endif
15 # Tooling dependencies of mscorlib, we build them to /tmp folder for MONO_PATH to work
16 # reliably for clean and update builds. All deps are built against stable API to run with
17 # range of boostrap versions and .NET at the same time
18 build_SUBDIRS = \
19 Mono.Cecil \
20 $(MCS_MODE_dirs) \
21 ../tools/cil-stringreplacer \
22 PEAPI \
23 ../ilasm \
24 corlib
26 build_PARALLEL_SUBDIRS = \
27 Mono.Security \
28 System \
29 System.XML \
30 System.Security \
31 Mono.Posix \
32 System.Core \
33 System.Configuration \
34 System.ComponentModel.Composition.4.5 \
35 System.Numerics \
36 System.Xml.Linq \
37 System.IO.Compression \
38 System.IO.Compression.FileSystem \
39 System.Net.Http \
40 System.Net.Http.WebRequest \
41 System.Drawing
43 ifdef MCS_MODE
45 build_SUBDIRS += \
46 Mono.Security \
47 System \
48 System.XML \
49 System.Security \
50 Mono.Posix \
51 System.Core \
52 Mono.CompilerServices.SymbolWriter
54 build_PARALLEL_SUBDIRS += ../mcs
55 endif
57 mobile_common_dirs := \
58 corlib
60 mobile_common_dirs_parallel := \
61 Mono.Security \
62 System \
63 System.Core \
64 System.XML \
65 System.Security \
66 I18N \
67 System.ServiceModel.Internals \
68 System.Runtime.Serialization \
69 System.Xml.Linq \
70 System.IdentityModel \
71 System.ServiceModel \
72 System.ServiceModel.Web \
73 System.Json \
74 System.Web.Services \
75 Mono.Data.Tds \
76 System.Transactions \
77 System.Numerics \
78 System.Numerics.Vectors \
79 System.Data \
80 Mono.Data.Sqlite \
81 System.Data.Services.Client \
82 System.IO.Compression \
83 System.IO.Compression.FileSystem \
84 System.ComponentModel.DataAnnotations \
85 System.ComponentModel.Composition.4.5 \
86 System.Net \
87 System.Net.Http \
88 System.Windows \
89 System.Xml.Serialization \
90 Microsoft.CSharp \
91 System.Reflection.Context \
92 System.Net.Http.WinHttpHandler \
93 System.Runtime.CompilerServices.Unsafe
95 testing_aot_full_dirs_parallel := \
96 $(mobile_common_dirs_parallel) \
97 Mono.Simd \
98 Mono.CSharp
100 testing_aot_full_interp_dirs_parallel := $(testing_aot_full_dirs_parallel)
102 testing_aot_hybrid_dirs_parallel := $(testing_aot_full_dirs_parallel)
104 xammac_dirs_parallel := \
105 $(mobile_common_dirs_parallel) \
106 Mono.CompilerServices.SymbolWriter \
107 Mono.CSharp
109 monodroid_dirs_parallel := \
110 $(mobile_common_dirs_parallel) \
111 Mono.CompilerServices.SymbolWriter \
112 Mono.Btls.Interface \
113 Mono.Posix \
114 Mono.CSharp \
115 Mono.Debugger.Soft \
116 Mono.Runtime.Tests
118 monodroid_tools_dirs_parallel := \
119 Mono.Cecil \
120 Mono.CompilerServices.SymbolWriter \
121 ICSharpCode.SharpZipLib \
122 monodoc \
123 Mono.Debugger.Soft \
124 Mono.Profiler.Log
126 monotouch_tools_dirs_parallel := \
127 Mono.Cecil \
128 Mono.Cecil.Mdb
130 monotouch_dirs_parallel := \
131 $(mobile_common_dirs_parallel) \
132 Mono.Simd \
133 Mono.CSharp \
134 Mono.Runtime.Tests
136 monotouch_watch_dirs_parallel := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_dirs_parallel))
138 monotouch_runtime_dirs_parallel := \
139 Mono.Security \
140 System \
141 System.Core \
142 System.XML \
143 Mono.CSharp
145 monotouch_tv_dirs_parallel := $(monotouch_dirs_parallel)
147 monotouch_tv_runtime_dirs_parallel := $(monotouch_runtime_dirs_parallel)
149 monotouch_watch_runtime_dirs_parallel := \
150 System \
151 System.Core \
152 System.XML \
153 Mono.CSharp
155 monotouch_tv_runtime_dirs := \
156 Mono.Security \
157 $(monotouch_watch_runtime_dirs_parallel)
159 winaot_dirs_parallel := \
160 $(mobile_common_dirs_parallel) \
161 Mono.Simd
163 testing_winaot_interp_dirs_parallel := \
164 $(mobile_common_dirs_parallel) \
165 Mono.Simd
167 unreal_dirs_parallel := \
168 $(mobile_common_dirs_parallel)
170 wasm_dirs_parallel := \
171 $(mobile_common_dirs_parallel)
173 wasm_tools_dirs_parallel := \
174 Mono.Cecil
176 orbis_dirs_parallel := \
177 $(filter-out Microsoft.CSharp Mono.Data.Sqlite,$(mobile_common_dirs_parallel))
179 xammac_4_5_dirs_parallel := \
180 Mono.Security \
181 System \
182 System.XML \
183 System.Security \
184 Mono.Posix \
185 System.Core \
186 System.Configuration \
187 I18N \
188 System.ServiceModel.Internals \
189 SMDiagnostics \
190 System.Numerics \
191 System.Numerics.Vectors \
192 Mono.Data.Tds \
193 System.Transactions \
194 System.EnterpriseServices \
195 System.Data \
196 System.Runtime.Serialization \
197 System.Xml.Linq \
198 Mono.Data.Sqlite \
199 System.Runtime.Serialization.Formatters.Soap \
200 System.ComponentModel.DataAnnotations \
201 System.IdentityModel \
202 System.IdentityModel.Selectors \
203 Mono.Messaging \
204 System.Configuration.Install \
205 System.Messaging \
206 System.Web.Services \
207 System.ServiceModel \
208 System.ServiceModel.Web \
209 System.Json \
210 System.Data.Services.Client \
211 System.IO.Compression \
212 System.IO.Compression.FileSystem \
213 System.ComponentModel.Composition.4.5 \
214 System.Net \
215 System.Windows \
216 System.Xml.Serialization \
217 Mono.CSharp \
218 Microsoft.CSharp \
219 Mono.CompilerServices.SymbolWriter \
220 System.Data.Linq \
221 System.Net.Http \
222 System.Net.Http.WebRequest \
223 System.Reflection.Context \
224 System.Net.Http.WinHttpHandler \
225 System.Runtime.CompilerServices.Unsafe
227 # Could be just mscorlib but we have unhandled dependency from RabbitMQ.Client.Apigen.exe
228 net_4_x_dirs := \
229 corlib \
230 Mono.Security \
231 System \
232 System.XML
234 net_4_x_parallel_dirs = \
235 System.Security \
236 Mono.Posix \
237 System.Core \
238 System.Configuration \
239 System.Drawing \
240 System.IO.Compression \
241 System.IO.Compression.FileSystem \
242 System.Transactions \
243 System.EnterpriseServices \
244 System.Numerics \
245 System.Numerics.Vectors \
246 System.Data \
247 System.ComponentModel.DataAnnotations \
248 Accessibility \
249 Mono.WebBrowser \
250 System.Runtime.Serialization.Formatters.Soap \
251 System.Windows.Forms \
252 Mono.Data.Sqlite \
253 System.Web.ApplicationServices \
254 Novell.Directory.Ldap \
255 System.DirectoryServices \
256 System.Design \
257 System.Web.Services \
258 System.Web \
259 System.Runtime.Remoting \
260 System.Configuration.Install \
261 System.Management \
262 System.Data.OracleClient \
263 Commons.Xml.Relaxng \
264 Mono.Messaging \
265 System.Messaging \
266 System.ServiceProcess \
267 System.Drawing.Design \
268 ICSharpCode.SharpZipLib \
269 Microsoft.CSharp \
270 System.ServiceModel.Internals \
271 SMDiagnostics \
272 System.Runtime.Serialization \
273 System.Xml.Linq \
274 System.Data.Linq \
275 System.Web.Abstractions \
276 System.Web.Routing \
277 System.Runtime.DurableInstancing \
278 System.IdentityModel \
279 System.IdentityModel.Selectors \
280 System.ServiceModel \
281 System.Web.Extensions \
282 System.Web.Extensions.Design \
283 System.Web.DynamicData \
284 System.Net \
285 System.Xaml \
286 WindowsBase \
287 System.ServiceModel.Activation \
288 System.ServiceModel.Routing \
289 System.ServiceModel.Discovery \
290 System.Runtime.Caching \
291 Microsoft.Web.Infrastructure \
292 System.ServiceModel.Web \
293 System.Net.Http \
294 System.Net.Http.WebRequest \
295 System.Web.Razor \
296 System.Web.WebPages.Deployment \
297 System.Web.WebPages \
298 System.Web.WebPages.Razor \
299 System.Web.Mvc3 \
300 System.Net.Http.Formatting \
301 System.Web.Http \
302 System.Web.Http.SelfHost \
303 System.Web.Http.WebHost \
304 CustomMarshalers \
305 IBM.Data.DB2 \
306 PEAPI \
307 I18N \
308 Cscompmgd \
309 Mono.CompilerServices.SymbolWriter \
310 Mono.Btls.Interface \
311 Mono.Http \
312 Mono.Cairo \
313 Mono.Cecil \
314 Mono.Cecil.Mdb \
315 Mono.CSharp \
316 Mono.Debugger.Soft \
317 Mono.C5 \
318 Mono.Management \
319 Mono.Options \
320 Mono.Simd \
321 Mono.Tasklets \
322 Mono.CodeContracts \
323 Mono.Parallel \
324 Mono.Security.Win32 \
325 Mono.Messaging.RabbitMQ \
326 Mono.Data.Tds \
327 System.Dynamic \
328 System.Windows.Forms.DataVisualization \
329 System.Reactive.Interfaces \
330 System.Reactive.Core \
331 System.Reactive.Linq \
332 System.Reactive.PlatformServices \
333 System.Reactive.Providers \
334 System.Reactive.Runtime.Remoting \
335 System.Reactive.Windows.Forms \
336 System.Reactive.Windows.Threading \
337 System.Reactive.Observable.Aliases \
338 System.Reactive.Experimental \
339 System.Reactive.Debugger \
340 System.Data.Services.Client \
341 System.Data.Services \
342 System.Data.Entity \
343 System.Data.DataSetExtensions \
344 System.Json \
345 System.Json.Microsoft \
346 System.Threading.Tasks.Dataflow \
347 System.ComponentModel.Composition.4.5 \
348 System.Windows \
349 System.Xml.Serialization \
350 System.DirectoryServices.Protocols \
351 RabbitMQ.Client \
352 Microsoft.VisualC \
353 WebMatrix.Data \
354 monodoc \
355 System.Deployment \
356 System.Web.Mobile \
357 System.Web.RegularExpressions \
358 System.Workflow.Activities \
359 System.Workflow.ComponentModel \
360 System.Workflow.Runtime \
361 System.Reflection.Context \
362 Mono.Profiler.Log \
363 Mono.Runtime.Tests \
364 System.Runtime.CompilerServices.Unsafe \
365 legacy/Mono.Cecil \
366 SystemWebTestShim \
367 $(xbuild_4_0_dirs)
369 xbuild_4_0_dirs := \
370 Microsoft.Build.Framework \
371 Microsoft.Build.Utilities \
372 Microsoft.Build.Engine \
373 Mono.XBuild.Tasks \
374 Microsoft.Build.Tasks \
375 Microsoft.Build
377 monodroid_SUBDIRS := $(mobile_common_dirs)
378 monodroid_PARALLEL_SUBDIRS := $(monodroid_dirs_parallel)
379 monodroid_tools_SUBDIRS :=
380 monodroid_tools_PARALLEL_SUBDIRS := $(monodroid_tools_dirs_parallel)
382 monotouch_SUBDIRS := $(mobile_common_dirs)
383 monotouch_PARALLEL_SUBDIRS := $(monotouch_dirs_parallel)
384 monotouch_watch_SUBDIRS := $(mobile_common_dirs)
385 monotouch_watch_PARALLEL_SUBDIRS := $(monotouch_watch_dirs_parallel)
386 monotouch_tv_SUBDIRS := $(mobile_common_dirs)
387 monotouch_tv_PARALLEL_SUBDIRS := $(monotouch_tv_dirs_parallel)
388 monotouch_runtime_SUBDIRS := $(mobile_common_dirs)
389 monotouch_runtime_PARALLEL_SUBDIRS := $(monotouch_runtime_dirs_parallel)
390 monotouch_watch_runtime_SUBDIRS := $(mobile_common_dirs)
391 monotouch_watch_runtime_PARALLEL_SUBDIRS := $(monotouch_watch_runtime_dirs_parallel)
392 monotouch_tv_runtime_SUBDIRS := $(mobile_common_dirs)
393 monotouch_tv_runtime_PARALLEL_SUBDIRS := $(monotouch_tv_runtime_dirs_parallel)
394 monotouch_tools_SUBDIRS :=
395 monotouch_tools_PARALLEL_SUBDIRS := $(monotouch_tools_dirs_parallel)
397 testing_aot_full_interp_SUBDIRS := $(mobile_common_dirs)
398 testing_aot_full_interp_PARALLEL_SUBDIRS := $(testing_aot_full_interp_dirs_parallel)
399 testing_aot_full_SUBDIRS := $(mobile_common_dirs)
400 testing_aot_full_PARALLEL_SUBDIRS := $(testing_aot_full_dirs_parallel)
401 testing_aot_hybrid_SUBDIRS := $(mobile_common_dirs)
402 testing_aot_hybrid_PARALLEL_SUBDIRS := $(testing_aot_hybrid_dirs_parallel)
404 xammac_SUBDIRS := $(mobile_common_dirs)
405 xammac_PARALLEL_SUBDIRS := $(xammac_dirs_parallel)
406 xammac_net_4_5_SUBDIRS := $(mobile_common_dirs)
407 xammac_net_4_5_PARALLEL_SUBDIRS := $(xammac_4_5_dirs_parallel)
409 binary_reference_assemblies_SUBDIRS := reference-assemblies
410 net_4_x_SUBDIRS := $(net_4_x_dirs)
411 net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs)
412 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
413 xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
415 winaot_SUBDIRS := $(mobile_common_dirs)
416 winaot_PARALLEL_SUBDIRS := $(winaot_dirs_parallel)
418 testing_winaot_interp_SUBDIRS := $(mobile_common_dirs)
419 testing_winaot_interp_PARALLEL_SUBDIRS := $(testing_winaot_interp_dirs_parallel)
421 orbis_SUBDIRS := $(mobile_common_dirs)
422 orbis_PARALLEL_SUBDIRS := $(orbis_dirs_parallel)
424 unreal_SUBDIRS := $(mobile_common_dirs)
425 unreal_PARALLEL_SUBDIRS := $(unreal_dirs_parallel)
427 wasm_SUBDIRS := $(mobile_common_dirs)
428 wasm_PARALLEL_SUBDIRS := $(wasm_dirs_parallel)
429 wasm_tools_SUBDIRS :=
430 wasm_tools_PARALLEL_SUBDIRS := $(wasm_tools_dirs_parallel)
432 netcore_SUBDIRS :=
433 netcore_PARALLEL_SUBDIRS :=
435 include ../build/rules.make
437 DIST_SUBDIRS = $(testing_aot_full_dirs_parallel) $(testing_aot_hybrid_dirs_parallel) $(monotouch_dirs_parallel) $(monotouch_tools_dirs_parallel) \
438 $(monodroid_dirs_parallel) $(monodroid_tools_dirs_parallel) $(xammac_dirs_parallel) $(net_4_x_dirs) $(net_4_x_parallel_dirs) \
439 $(xammac_4_5_dirs_parallel) $(unreal_dirs_parallel) $(wasm_dirs_parallel) $(wasm_tools_dirs_parallel) $(xbuild_14_SUBDIRS) \
440 $(testing_aot_full_interp_dirs_parallel) $(netcore_SUBDIRS) dlr aot-compiler reference-assemblies Facades
442 # No new makefiles for: System.Messaging, System.Web.Mobile,
443 # System.ServiceProcess
445 DISTFILES = \
446 ecma.pub \
447 winfx.pub \
448 winfx3.pub \
449 mono.pub \
450 msfinal.pub \
451 silverlight.pub \
452 reactive.pub \
453 mono.snk \
454 Open.snk \
455 LICENSE \
456 README \
457 doc/API-notes \
458 doc/NUnitGuidelines \
459 doc/TemplateTest.cs \
460 notes/BitVecto32.txt \
461 MicrosoftAjaxLibrary/License.htm \
462 test-helpers/AdminHelper.cs \
463 test-helpers/Configuration.Http.cs \
464 test-helpers/NetworkHelpers.cs \
465 test-helpers/NunitHelpers.cs \
466 test-helpers/PlatformDetection.cs \
467 test-helpers/RemoteExecutorTestBase.Mobile.cs \
468 test-helpers/RemoteExecutorTestBase.Mono.cs \
469 test-helpers/SocketResponder.cs \
470 test-helpers/TestResourceHelper.cs \
471 test-helpers/PathHelpers.cs \
472 $(foreach HOST_PLATFORM,macos linux win32 unix,lib/$(monolite_dir)/mcs.exe $(monolite_files))
474 .PHONY: all-local $(STD_TARGETS:=-local)
475 all-local $(STD_TARGETS:=-local):
478 all-local-aot:
480 monolite_dir = monolite-$(HOST_PLATFORM)/$(MONO_CORLIB_VERSION)
482 # Files needed to bootstrap C# compiler and cil-stringreplacer
483 build_files := mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll \
484 System.Numerics.dll System.Xml.Linq.dll System.IO.Compression.dll \
485 Facades/System.Collections.Concurrent.dll Facades/System.Linq.dll Facades/System.Runtime.dll Facades/System.Collections.dll \
486 Facades/System.Reflection.Extensions.dll Facades/System.Text.Encoding.Extensions.dll Facades/System.Diagnostics.Debug.dll \
487 Facades/System.Reflection.Primitives.dll Facades/System.Text.Encoding.dll Facades/System.Diagnostics.Tools.dll Facades/System.Reflection.dll \
488 Facades/System.Threading.Tasks.Parallel.dll Facades/System.Dynamic.Runtime.dll Facades/System.Resources.ResourceManager.dll \
489 Facades/System.Threading.Tasks.dll Facades/System.Globalization.dll Facades/System.Runtime.Extensions.dll Facades/System.Threading.dll \
490 Facades/System.IO.dll Facades/System.Runtime.InteropServices.dll Facades/System.Xml.ReaderWriter.dll Facades/System.Linq.Expressions.dll \
491 Facades/System.Runtime.Numerics.dll Facades/System.Xml.XDocument.dll Facades/System.IO.FileSystem.Primitives.dll Facades/System.IO.FileSystem.dll \
492 Facades/System.Diagnostics.FileVersionInfo.dll Facades/System.Security.Cryptography.Primitives.dll Facades/System.Security.Cryptography.Algorithms.dll \
493 Facades/System.ValueTuple.dll Facades/System.Text.Encoding.CodePages.dll Facades/netstandard.dll \
494 Mono.Cecil.dll
496 monolite_files = $(build_files:%=lib/$(monolite_dir)/%)
498 lib/$(monolite_dir):
499 lib/$(monolite_dir)/Facades:
500 $(MKINSTALLDIRS) $@
502 $(monolite_files): | lib/$(monolite_dir)
503 $(monolite_files): | lib/$(monolite_dir)/Facades
504 $(monolite_files): lib/$(monolite_dir)/%: lib/build-$(HOST_PLATFORM)/%
505 cp -p $< $@
507 lib/$(monolite_dir)/mcs.exe:
508 $(MAKE) -C ../mcs PROFILE=build
509 cp -p lib/build-$(HOST_PLATFORM)/mcs.exe lib/$(monolite_dir)
511 $(build_files:%=lib/build-$(HOST_PLATFORM)/%):
512 cd $(topdir) && $(MAKE) profile-do--build--all NO_DIR_CHECK=1 SKIP_AOT=1
514 dist-monolite: $(monolite_files) lib/$(monolite_dir)/mcs.exe
516 dist-monolite-all-platforms:
517 $(MAKE) dist-monolite HOST_PLATFORM=macos
518 $(MAKE) dist-monolite HOST_PLATFORM=linux
519 $(MAKE) dist-monolite HOST_PLATFORM=win32
520 $(MAKE) dist-monolite HOST_PLATFORM=unix
522 package-monolite-latest:
523 MONOLITE=monolite-$(HOST_PLATFORM)-$(MONO_CORLIB_VERSION)-latest; \
524 $(MAKE) dist-monolite monolite_dir=$$MONOLITE; \
525 tar zcvpf $$MONOLITE.tar.gz --directory=lib $$MONOLITE/
527 package-monolite-latest-all-platforms:
528 $(MAKE) package-monolite-latest HOST_PLATFORM=macos
529 $(MAKE) package-monolite-latest HOST_PLATFORM=linux
530 $(MAKE) package-monolite-latest HOST_PLATFORM=win32
531 $(MAKE) package-monolite-latest HOST_PLATFORM=unix
533 monolite_url = https://download.mono-project.com/monolite/monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest.tar.gz
535 get-monolite-latest:
536 -rm -fr lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
537 -mkdir -p lib/monolite-$(BUILD_PLATFORM)
538 cd lib && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
539 cd lib && mv -f monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
541 dist-default: dist-monolite-all-platforms
543 dist-local: dist-default
545 csproj-local:
547 do-clean:
548 $(RM) -rf $(topdir)/class/lib/$(PROFILE)
550 ## Aliases for .dep_dirs-* tracker
551 .PHONY: Microsoft.Build.Utilities.v4.0 System.ComponentModel.Composition System.Xml
552 Microsoft.Build.Utilities.v4.0: Microsoft.Build.Utilities
553 System.ComponentModel.Composition: System.ComponentModel.Composition.4.5
554 System.Xml: System.XML