Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoao Matos <joao@tritao.eu>2016-11-10 19:40:38 +0300
committerJoao Matos <joao@tritao.eu>2016-11-10 22:28:35 +0300
commitf63ae59412cd56e15442cf9578711f95c15aa037 (patch)
tree4eba8e8e00cb0539c3021c02cab88c96e91cd801 /tools
parent77a1de7001a386aa9c9f08cc4252930664c2d7cb (diff)
[offsets-tool] Updated build scripts to handle multiple platforms.
Diffstat (limited to 'tools')
-rw-r--r--tools/offsets-tool/Makefile28
1 files changed, 27 insertions, 1 deletions
diff --git a/tools/offsets-tool/Makefile b/tools/offsets-tool/Makefile
index 0cb0afc4fe7..0a60dbdc30b 100644
--- a/tools/offsets-tool/Makefile
+++ b/tools/offsets-tool/Makefile
@@ -1,4 +1,30 @@
-CPPSHARP_DIR = CppSharp
+CPPSHARP_BASE_DIR = CppSharp
+
+ifeq ($(OS),Windows_NT)
+ CPPSHARP_OS=windows
+ ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
+ CPPSHARP_ARCH=64
+ else
+ ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
+ CPPSHARP_ARCH=64
+ endif
+ ifeq ($(PROCESSOR_ARCHITECTURE),x86)
+ CPPSHARP_ARCH=32
+ endif
+ endif
+else
+ UNAME_S := $(shell uname -s)
+ ifeq ($(UNAME_S),Linux)
+ CPPSHARP_OS=linux
+ CPPSHARP_ARCH=64
+ endif
+ ifeq ($(UNAME_S),Darwin)
+ CPPSHARP_OS=osx
+ CPPSHARP_ARCH=32
+ endif
+endif
+
+CPPSHARP_DIR = $(CPPSHARP_BASE_DIR)/$(CPPSHARP_OS)_$(CPPSHARP_ARCH)
CPPSHARP_REFS = -r:$(CPPSHARP_DIR)/CppSharp.dll \
-r:$(CPPSHARP_DIR)/CppSharp.AST.dll \