diff options
author | Joao Matos <joao@tritao.eu> | 2016-11-10 19:40:38 +0300 |
---|---|---|
committer | Joao Matos <joao@tritao.eu> | 2016-11-10 20:27:00 +0300 |
commit | 292f5ee3773e43561b2b26e1de114f78b76057f9 (patch) | |
tree | 5cd8037d5797145034cd002391a817d1609669af /tools | |
parent | d09eb49b80a0b075ec6b1b4a6e0299c05014fed6 (diff) |
[offsets-tool] Updated build scripts to handle multiple platforms.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/offsets-tool/Makefile | 28 |
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 \ |