-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
Copy pathMakefile
102 lines (88 loc) · 3.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.DEFAULT_GOAL := all
TOP=../../../../
BUILD_CONFIG?=Debug
TARGET_ARCH?=$(shell . $(TOP)eng/common/native/init-os-and-arch.sh && echo $${arch})
TARGET_OS?=iossimulator
USE_LLVM=true
DEPLOY_AND_RUN?=true
APP_SANDBOX?=false
STRIP_DEBUG_SYMBOLS?=false # only used when measuring SOD via build-appbundle make target
HYBRID_GLOBALIZATION?=true
#If DIAGNOSTIC_PORTS is enabled, @(RuntimeComponents) must also include 'diagnostics_tracing'.
#If @(RuntimeComponents) includes 'diagnostics_tracing', DIAGNOSTIC_PORTS is optional.
#If @(RuntimeComponents) includes 'diagnostics_tracing', and DIAGNOSTIC_PORTS is disabled, then use DOTNET_DiagnosticPorts when launching application to enable diagnostics.
#DIAGNOSTIC_PORTS=127.0.0.1:9000,nosuspend
#DIAGNOSTIC_PORTS=127.0.0.1:9000,suspend
#DIAGNOSTIC_PORTS=$(DOTNET_DiagnosticPorts)
REPO_DIR=$(realpath $(TOP))
TASKS_DIR=$(REPO_DIR)/src/tasks
DOTNET=$(REPO_DIR)/dotnet.sh
BUILD_SCRIPT=$(REPO_DIR)/build.sh
all: runtimepack run
appbuilder:
$(DOTNET) build -c $(BUILD_CONFIG) $(TASKS_DIR)/AotCompilerTask/MonoAOTCompiler.csproj
$(DOTNET) build -c $(BUILD_CONFIG) $(TASKS_DIR)/MonoTargetsTasks/MonoTargetsTasks.csproj
$(DOTNET) build -c $(BUILD_CONFIG) $(TASKS_DIR)/AppleAppBuilder/AppleAppBuilder.csproj
runtimepack:
$(BUILD_SCRIPT) mono+libs -os $(TARGET_OS) -arch $(TARGET_ARCH) -c $(BUILD_CONFIG)
build-appbundle: clean appbuilder
$(DOTNET) publish \
-c $(BUILD_CONFIG) \
/p:TargetOS=$(TARGET_OS) \
/p:TargetArchitecture=$(TARGET_ARCH) \
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:StripDebugSymbols=$(STRIP_DEBUG_SYMBOLS) \
/p:DeployAndRun=false \
/p:HybridGlobalization=$(HYBRID_GLOBALIZATION) \
/bl
run: clean appbuilder
$(DOTNET) publish \
-c $(BUILD_CONFIG) \
/p:TargetOS=ios \
/p:TargetArchitecture=$(TARGET_ARCH) \
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' \
/bl
run-sim: clean appbuilder
$(DOTNET) publish \
-c $(BUILD_CONFIG) \
/p:TargetOS=iossimulator \
/p:TargetArchitecture=$(TARGET_ARCH) \
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:MonoForceInterpreter=false \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' \
/bl
run-sim-interp: clean appbuilder
$(DOTNET) publish \
-c $(BUILD_CONFIG) \
/p:TargetOS=iossimulator \
/p:TargetArchitecture=$(TARGET_ARCH) \
/p:MonoEnableLLVM=$(USE_LLVM) \
/p:MonoForceInterpreter=true \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
'/p:DiagnosticPorts="$(DIAGNOSTIC_PORTS)"' \
/bl
run-catalyst: clean appbuilder
$(DOTNET) publish \
-c $(BUILD_CONFIG) \
/p:TargetOS=maccatalyst \
/p:TargetArchitecture=$(TARGET_ARCH) \
/p:MonoEnableLLVM=false \
/p:MonoForceInterpreter=false \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:EnableAppSandbox=$(APP_SANDBOX) \
/bl
run-catalyst-interp: clean appbuilder
$(DOTNET) publish \
-c $(BUILD_CONFIG) \
/p:TargetOS=maccatalyst \
/p:TargetArchitecture=$(TARGET_ARCH) \
/p:MonoEnableLLVM=false \
/p:MonoForceInterpreter=true \
/p:DeployAndRun=$(DEPLOY_AND_RUN) \
/p:EnableAppSandbox=$(APP_SANDBOX) \
/bl
clean:
rm -rf obj bin *.binlog