summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-28 22:58:23 +0800
committerruki <[email protected]>2020-02-28 11:50:23 +0800
commit9fe4b550970a66fbfebff7c97baf7ef418dd0c8d (patch)
tree50e708b8cc30d96d88b44ba59b67c44ec501dd7b /makefile
parent75e37c2f401c6547b417b157d7666dee293101e7 (diff)
fix makefile for termux/ci
Diffstat (limited to 'makefile')
-rw-r--r--makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/makefile b/makefile
index 734aefe16..21ed012cb 100644
--- a/makefile
+++ b/makefile
@@ -51,11 +51,16 @@ ARCH :=$(if $(findstring x64,$(ARCH)),x86_64,$(ARCH))
# for arm linux?
ifeq ($(PLAT),linux)
-ARCHSTR := $(shell uname -m)
+ifneq ($(TERMUX_ARCH),)
+ARCHSTR := $(TERMUX_ARCH) # on termux/ci
+else
+ARCHSTR := $(shell uname -m) # on arm device, e.g. termux app
+endif
ARCH := $(if $(findstring aarch64,$(ARCHSTR)),arm64,$(ARCH))
ARCH := $(if $(findstring arm64,$(ARCHSTR)),arm64,$(ARCH))
ARCH := $(if $(findstring armv7,$(ARCHSTR)),armv7,$(ARCH))
ARCH := $(if $(findstring arm,$(ARCHSTR)),arm,$(ARCH))
+ARCH := $(if $(findstring i686,$(ARCHSTR)),i386,$(ARCH))
endif
endif