summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-12-09 00:54:15 +0800
committerruki <[email protected]>2017-12-08 23:25:34 +0800
commit2513f944a5a6d4606262369cf56c86ea186c9053 (patch)
tree91184093bfcb408fce5dcf44653d3f9f57156e0f
parent8df3cf8fcdbfb3e169c45880eef5e11cc1f8c075 (diff)
update core makefile for arm
-rw-r--r--core/makefile8
-rw-r--r--makefile8
2 files changed, 16 insertions, 0 deletions
diff --git a/core/makefile b/core/makefile
index 236e6a028..252fc852a 100644
--- a/core/makefile
+++ b/core/makefile
@@ -166,6 +166,14 @@ ARCH :=$(if $(findstring x64,$(ARCH)),x86_64,$(ARCH))
ARCH :=$(if $(findstring iphoneos,$(PLAT)),armv7,$(ARCH))
ARCH :=$(if $(findstring android,$(PLAT)),armv7,$(ARCH))
+# for arm linux?
+ifeq ($(PLAT),linux)
+ARCHSTR := $(shell uname -m)
+ARCH := $(if $(findstring aarch64,$(ARCHSTR)),arm64,$(ARCH))
+ARCH := $(if $(findstring armv7,$(ARCHSTR)),armv7,$(ARCH))
+ARCH := $(if $(findstring arm,$(ARCHSTR)),arm,$(ARCH))
+endif
+
endif
# debug
diff --git a/makefile b/makefile
index 7b8df04dd..9d987f015 100644
--- a/makefile
+++ b/makefile
@@ -28,6 +28,14 @@ ARCH :=$(if $(findstring x64,$(ARCH)),x86_64,$(ARCH))
ARCH :=$(if $(findstring iphoneos,$(PLAT)),armv7,$(ARCH))
ARCH :=$(if $(findstring android,$(PLAT)),armv7,$(ARCH))
+# for arm linux?
+ifeq ($(PLAT),linux)
+ARCHSTR := $(shell uname -m)
+ARCH := $(if $(findstring aarch64,$(ARCHSTR)),arm64,$(ARCH))
+ARCH := $(if $(findstring armv7,$(ARCHSTR)),armv7,$(ARCH))
+ARCH := $(if $(findstring arm,$(ARCHSTR)),arm,$(ARCH))
+endif
+
endif
xmake_dir_install :=$(prefix)/share/xmake