From c76494f2fbadd56c93b4b1a86c3c0a36a3f3d1bb Mon Sep 17 00:00:00 2001 From: EgorBo Date: Fri, 31 Jan 2020 15:34:04 +0300 Subject: [PATCH] Add Makefile --- src/mono/netcore/Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/mono/netcore/Makefile diff --git a/src/mono/netcore/Makefile b/src/mono/netcore/Makefile new file mode 100644 index 0000000..358cc5a --- /dev/null +++ b/src/mono/netcore/Makefile @@ -0,0 +1,28 @@ + +DOTNET=../../../.dotnet/dotnet +TESTHOST_PATH=../../../artifacts/bin/testhost/ + +TARGET_FRAMEWORK= +CONFIGURATION= +OS= +PLATFORM= + +# let's check ../../../artifacts/bin/testhost/ for available configurations +# it's expected to see there only a single config, e.g. "netcoreapp5.0-OSX-Release-x64" +# otherwise you have to set these variables for desired config +ifeq ($(words $(wildcard $(TESTHOST_PATH)/*)), 1) + TESTHOST_CFG := $(subst -, ,$(notdir $(wildcard $(TESTHOST_PATH)/*))) + CONFIGURATION := $(word 3,$(TESTHOST_CFG)) + OS := $(word 2,$(TESTHOST_CFG)) + TARGET_FRAMEWORK := $(word 1,$(TESTHOST_CFG)) + PLATFORM := $(word 4,$(TESTHOST_CFG)) +endif + +check-config: + @if test -z "$(CONFIGURATION)"; then echo "CONFIGURATION is not set"; exit 1; fi + +run-sample: check-config + $(DOTNET) msbuild /t:RunSample /p:Configuration=$(CONFIGURATION) ../mono.proj + +runtime: + $(DOTNET) msbuild /t:Build ../mono.proj -- 2.7.4