Add new profile for monodroid tools (#5699)
[mono.git] / mcs / class / Makefile
index 8e746d7f6e7e1db4a2a763cfb34ffb4603e1c1b0..7d9329e02da24d8cb2f7b74cfb52d703547b4933 100644 (file)
@@ -1,10 +1,26 @@
 thisdir = class
 
-basic_SUBDIRS := corlib Mono.Security System System.XML System.Core 
+pcl_facade_dirs := Facades
+
+-include ../build/config.make
 
-# resgen is corlib specific so we need to wait until corlib is build
-# and build it just a step before first dll needs it
-resgen_dir = ../tools/resgen
+ifdef MCS_MODE
+MCS_MODE_dirs := Mono.Cecil.Mdb
+endif
+
+# The minimal set of csc dependencies
+basic_SUBDIRS := \
+       corlib \
+       Mono.Security \
+       System \
+       System.XML \
+       System.Core \
+       System.ComponentModel.Composition.4.5 \
+       System.Numerics \
+       System.Xml.Linq \
+       Mono.Cecil \
+       $(MCS_MODE_dirs) \
+       ../tools/cil-stringreplacer
 
 build_SUBDIRS :=  \
        corlib \
@@ -13,10 +29,24 @@ build_SUBDIRS :=  \
        System.XML \
        Mono.Posix \
        System.Core \
+       System.ComponentModel.Composition.4.5 \
+       System.Numerics \
+       System.Xml.Linq \
+       System.IO.Compression \
+       System.Drawing                  \
        Mono.Cecil \
-       Mono.Cecil.Mdb
+       $(MCS_MODE_dirs) \
+       Mono.CompilerServices.SymbolWriter      \
+       PEAPI \
+       ../tools/cil-stringreplacer
 
-pcl_facade_dirs := Facades
+ifdef MCS_MODE
+basic_PARALLEL_SUBDIRS := ../mcs
+build_PARALLEL_SUBDIRS := ../mcs
+else
+basic_PARALLEL_SUBDIRS := $(pcl_facade_dirs)
+build_PARALLEL_SUBDIRS := $(pcl_facade_dirs)
+endif
 
 mobile_common_dirs := \
        corlib  \
@@ -29,6 +59,7 @@ mobile_common_dirs := \
        System.ServiceModel.Internals   \
        System.Runtime.Serialization    \
        System.Xml.Linq \
+       System.IdentityModel            \
        System.ServiceModel     \
        System.ServiceModel.Web \
        System.Json     \
@@ -50,38 +81,42 @@ mobile_common_dirs := \
        System.Xml.Serialization \
        Mono.CSharp     \
        Microsoft.CSharp \
-       Mono.Security.Providers.DotNet  \
-       Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls  \
-       System.Runtime.InteropServices.RuntimeInformation       \
-       System.Reflection.DispatchProxy \
-       System.Xml.XPath.XmlDocument \
        System.Reflection.Context       \
        System.Net.Http.WinHttpHandler
 
-mobile_static_dirs := \
+testing_aot_full_dirs := \
        $(mobile_common_dirs)   \
-       Mono.Dynamic.Interpreter        \
-       PEAPI   \
-       Mono.CompilerServices.SymbolWriter      \
        Mono.Simd                       \
        $(pcl_facade_dirs)
 
-mobile_dynamic_dirs := \
+testing_aot_hybrid_dirs := \
        $(mobile_common_dirs)   \
-       Mono.CompilerServices.SymbolWriter      \
+       Mono.Simd                       \
        $(pcl_facade_dirs)
 
 xammac_dirs := \
-       $(mobile_dynamic_dirs)
+       $(mobile_common_dirs)   \
+       Mono.CompilerServices.SymbolWriter      \
+       $(pcl_facade_dirs)
 
 monodroid_dirs := \
-       $(mobile_dynamic_dirs)
+       $(mobile_common_dirs)   \
+       Mono.CompilerServices.SymbolWriter      \
+       Mono.Btls.Interface     \
+       Mono.Posix      \
+       $(pcl_facade_dirs)
+
+monodroid_tools_dirs := \
+       Mono.Cecil      \
+       ICSharpCode.SharpZipLib \
+       monodoc
 
 monotouch_dirs := \
-       $(mobile_static_dirs)
+       $(mobile_common_dirs)   \
+       Mono.Simd                       \
+       $(pcl_facade_dirs)
 
-monotouch_watch_dirs := $(monotouch_dirs)
+monotouch_watch_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_dirs))
 monotouch_tv_dirs   := $(monotouch_dirs)
 
 monotouch_runtime_dirs := \
@@ -92,9 +127,19 @@ monotouch_runtime_dirs := \
        System.XML \
        Mono.CSharp
 
-monotouch_watch_runtime_dirs := $(monotouch_runtime_dirs)
+monotouch_watch_runtime_dirs := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_runtime_dirs))
 monotouch_tv_runtime_dirs := $(monotouch_runtime_dirs)
 
+winaot_dirs := \
+       $(mobile_common_dirs)   \
+       System.Drawing                  \
+       $(pcl_facade_dirs)
+
+unreal_dirs := \
+       $(mobile_common_dirs)   \
+       System.Drawing                  \
+       $(pcl_facade_dirs)
+
 xammac_4_5_dirs := \
        corlib  \
        Mono.Security \
@@ -107,6 +152,7 @@ xammac_4_5_dirs := \
        System.ServiceModel.Internals   \
        SMDiagnostics   \
        System.Numerics \
+       System.Numerics.Vectors         \
        Mono.Data.Tds   \
        System.Transactions     \
        System.EnterpriseServices       \
@@ -138,11 +184,6 @@ xammac_4_5_dirs := \
        System.Data.Linq                \
        System.Net.Http \
        System.Net.Http.WebRequest \
-       Mono.Security.Providers.DotNet \
-       Mono.Security.Providers.OldTls \
-       Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls \
-       System.Runtime.InteropServices.RuntimeInformation \
        System.Reflection.Context       \
        System.Net.Http.WinHttpHandler  \
        $(pcl_facade_dirs)
@@ -157,10 +198,9 @@ net_4_x_dirs := \
        System.Core                     \
        System.Security                 \
        System.Configuration    \
-       $(resgen_dir)                   \
+       System.Drawing                  \
        System.IO.Compression           \
        System.IO.Compression.FileSystem \
-       System.Drawing                  \
        System.Transactions             \
        System.EnterpriseServices       \
        Mono.Data.Tds                   \
@@ -229,16 +269,14 @@ net_4_x_dirs := \
        System.Net.Http.Formatting \
        System.Web.Http \
        System.Web.Http.SelfHost \
-       System.Web.Http.WebHost \
-       Mono.Security.Providers.NewSystemSource \
-       Mono.Security.Providers.NewTls \
-       System.Runtime.InteropServices.RuntimeInformation
+       System.Web.Http.WebHost
 
 # These are the subdirs which depends on libs in net_4_x_dirs
 # or have proper dependencies between each other
 net_4_x_parallel_dirs := \
        PEAPI                           \
        I18N                            \
+       Mono.Btls.Interface             \
        Mono.Http                       \
        Mono.Cairo                      \
        Mono.Cecil                      \
@@ -275,8 +313,6 @@ net_4_x_parallel_dirs := \
        System.ComponentModel.Composition.4.5 \
        System.Windows \
        System.Xml.Serialization \
-       Mono.Security.Providers.DotNet \
-       Mono.Security.Providers.OldTls \
        System.DirectoryServices.Protocols      \
        RabbitMQ.Client                 \
        Microsoft.VisualC               \
@@ -289,6 +325,7 @@ net_4_x_parallel_dirs := \
        System.Workflow.ComponentModel \
        System.Workflow.Runtime \
        System.Reflection.Context \
+       Mono.Profiler.Log       \
        legacy/Mono.Cecil \
        $(pcl_facade_dirs)
 
@@ -303,26 +340,35 @@ xbuild_4_0_dirs := \
        $(xbuild_2_0_dirs)      \
        Microsoft.Build
 
+orbis_dirs := \
+       $(filter-out Microsoft.CSharp Mono.CSharp Mono.Data.Sqlite,$(mobile_common_dirs))       \
+       System.Drawing          \
+       $(pcl_facade_dirs)
+
 monodroid_SUBDIRS := $(monodroid_dirs)
+monodroid_tools_SUBDIRS := $(monodroid_tools_dirs)
 monotouch_SUBDIRS := $(monotouch_dirs)
 monotouch_watch_SUBDIRS := $(monotouch_watch_dirs)
 monotouch_tv_SUBDIRS    := $(monotouch_tv_dirs)
 monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
 monotouch_watch_runtime_SUBDIRS := $(monotouch_watch_runtime_dirs)
 monotouch_tv_runtime_SUBDIRS := $(monotouch_tv_runtime_dirs)
-mobile_static_SUBDIRS := $(mobile_static_dirs)
-mobile_SUBDIRS := $(mobile_dynamic_dirs)
+testing_aot_full_SUBDIRS := $(testing_aot_full_dirs)
+testing_aot_hybrid_SUBDIRS := $(testing_aot_hybrid_dirs)
 xammac_SUBDIRS := $(xammac_dirs)
 xammac_net_4_5_SUBDIRS := $(xammac_4_5_dirs)
 binary_reference_assemblies_SUBDIRS := reference-assemblies
 net_4_x_SUBDIRS := $(net_4_x_dirs) $(xbuild_4_0_dirs)
-net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs) aot-compiler
+net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs)
 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
 xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
+winaot_SUBDIRS := $(winaot_dirs)
+orbis_SUBDIRS := $(orbis_dirs)
+unreal_SUBDIRS := $(unreal_dirs)
 
 include ../build/rules.make
 
-SUBDIRS = $(mobile_static_dirs) $(mobile_dynamic_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS)
+SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(monodroid_tools_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS) $(unreal_dirs)
 
 DIST_ONLY_SUBDIRS = dlr aot-compiler reference-assemblies $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
 
@@ -338,6 +384,7 @@ DISTFILES = \
        silverlight.pub         \
        reactive.pub            \
        mono.snk                \
+       Open.snk                \
        LICENSE                 \
        README                  \
        doc/API-notes           \
@@ -347,7 +394,7 @@ DISTFILES = \
        MicrosoftAjaxLibrary/License.htm        \
        test-helpers/NetworkHelpers.cs  \
        test-helpers/SocketResponder.cs \
-       $(monolite_files)
+       $(foreach HOST_PLATFORM,darwin linux win32,lib/$(monolite_dir)/mcs.exe $(monolite_files))
 
 .PHONY: all-local $(STD_TARGETS:=-local)
 all-local $(STD_TARGETS:=-local):
@@ -355,21 +402,66 @@ all-local $(STD_TARGETS:=-local):
 
 all-local-aot:
 
-# Files needed to bootstrap C# compiler
-basic_files = basic.exe mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll
-monolite_files = $(basic_files:%=lib/monolite/%)
+monolite_dir = monolite-$(HOST_PLATFORM)/$(MONO_CORLIB_VERSION)
 
-lib/monolite:
+# Files needed to bootstrap C# compiler
+build_files = mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll \
+       System.Numerics.dll System.Xml.Linq.dll \
+       Facades/System.Collections.Concurrent.dll Facades/System.Linq.dll Facades/System.Runtime.dll Facades/System.Collections.dll     \
+       Facades/System.Reflection.Extensions.dll Facades/System.Text.Encoding.Extensions.dll Facades/System.Diagnostics.Debug.dll \
+       Facades/System.Reflection.Primitives.dll Facades/System.Text.Encoding.dll Facades/System.Diagnostics.Tools.dll Facades/System.Reflection.dll \
+       Facades/System.Threading.Tasks.Parallel.dll Facades/System.Dynamic.Runtime.dll Facades/System.Resources.ResourceManager.dll \
+       Facades/System.Threading.Tasks.dll Facades/System.Globalization.dll Facades/System.Runtime.Extensions.dll Facades/System.Threading.dll \
+       Facades/System.IO.dll Facades/System.Runtime.InteropServices.dll Facades/System.Xml.ReaderWriter.dll Facades/System.Linq.Expressions.dll \
+       Facades/System.Runtime.Numerics.dll Facades/System.Xml.XDocument.dll Facades/System.IO.FileSystem.Primitives.dll Facades/System.IO.FileSystem.dll \
+       Facades/System.Diagnostics.FileVersionInfo.dll Facades/System.Security.Cryptography.Primitives.dll Facades/System.Security.Cryptography.Algorithms.dll \
+       Facades/System.ValueTuple.dll Facades/System.Text.Encoding.CodePages.dll
+
+monolite_files = $(build_files:%=lib/$(monolite_dir)/%)
+
+lib/$(monolite_dir):
+lib/$(monolite_dir)/Facades:
        $(MKINSTALLDIRS) $@
 
-$(monolite_files): | lib/monolite
-$(monolite_files): lib/monolite/%: lib/basic/%
+$(monolite_files): | lib/$(monolite_dir)
+$(monolite_files): | lib/$(monolite_dir)/Facades
+$(monolite_files): lib/$(monolite_dir)/%: lib/build-$(HOST_PLATFORM)/%
        cp -p $< $@
 
-$(basic_files:%=lib/basic/%):
-       cd $(topdir) && $(MAKE) profile-do--basic--all NO_DIR_CHECK=1 SKIP_AOT=1
+lib/$(monolite_dir)/mcs.exe:
+       $(MAKE) -C ../mcs PROFILE=build
+       cp -p lib/build-$(HOST_PLATFORM)/mcs.exe lib/$(monolite_dir)
+
+$(build_files:%=lib/build-$(HOST_PLATFORM)/%):
+       cd $(topdir) && $(MAKE) profile-do--build--all NO_DIR_CHECK=1 SKIP_AOT=1
+
+dist-monolite: $(monolite_files) lib/$(monolite_dir)/mcs.exe
+
+dist-monolite-all-platforms:
+       $(MAKE) dist-monolite HOST_PLATFORM=darwin
+       $(MAKE) dist-monolite HOST_PLATFORM=linux
+       $(MAKE) dist-monolite HOST_PLATFORM=win32
+
+package-monolite-latest:
+       MONOLITE=monolite-$(HOST_PLATFORM)-$(MONO_CORLIB_VERSION)-latest; \
+       $(MAKE) dist-monolite monolite_dir=$$MONOLITE; \
+       tar zcvpf $$MONOLITE.tar.gz --directory=lib $$MONOLITE/
+
+package-monolite-latest-all-platforms:
+       $(MAKE) package-monolite-latest HOST_PLATFORM=darwin
+       $(MAKE) package-monolite-latest HOST_PLATFORM=linux
+       $(MAKE) package-monolite-latest HOST_PLATFORM=win32
+
+monolite_url = https://download.mono-project.com/monolite/monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest.tar.gz
+
+get-monolite-latest:
+       -rm -fr lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
+       -mkdir -p lib/monolite-$(BUILD_PLATFORM)
+       cd lib && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
+       cd lib && mv -f monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
+
+dist-default: dist-monolite-all-platforms
 
-dist-default: $(monolite_files)
 dist-local: dist-default
 
 csproj-local: