aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaysonicc <62731682+Jaysonicc@users.noreply.github.com>2021-06-13 21:28:57 +0800
committerGitHub <noreply@github.com>2021-06-13 21:28:57 +0800
commit9b0a882a0e3aa12a6453ca255056b8dd664cd584 (patch)
tree098982648bdc6203870be225abba408d5e79a3b7
parent3a135d82104774c988d562a351cfe28abff59f77 (diff)
downloadcapstone-9b0a882a0e3aa12a6453ca255056b8dd664cd584.tar.gz
fix build android (#1765)
* Update make.sh fix build android * Update Makefile fix build android
-rwxr-xr-xmake.sh2
-rw-r--r--tests/Makefile2
2 files changed, 3 insertions, 1 deletions
diff --git a/make.sh b/make.sh
index eb400a99..d359bfca 100755
--- a/make.sh
+++ b/make.sh
@@ -47,7 +47,7 @@ build_android() {
--install-dir ${STANDALONE}
}
- ANDROID=1 CROSS="${STANDALONE}/${CROSS}/bin" CFLAGS="--sysroot=${STANDALONE}/sysroot" ${MAKE} $*
+ ANDROID=1 CROSS="${STANDALONE}/${CROSS}/bin/" CC=clang CFLAGS="--sysroot=${STANDALONE}/sysroot" ${MAKE} $*
}
# build iOS lib for all iDevices, or only specific device
diff --git a/tests/Makefile b/tests/Makefile
index eb0fbd50..f57eb3ed 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -20,6 +20,8 @@ endif
ifeq ($(CROSS),)
CC ?= cc
+else ifeq ($(ANDROID), 1)
+CC = $(CROSS)/../../bin/clang
else
CC = $(CROSS)gcc
endif