@@ -71,13 +71,17 @@ else ifeq ($(PLATFORM),macos)
7171 CURL_CONFIG = --with-secure-transport CFLAGS="-arch x86_64 -arch arm64"
7272else ifeq ($(PLATFORM),android)
7373 # Set ARCH to find Android NDK's Clang compiler, the user should set the ARCH
74- # example CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang
7574 ifeq ($(filter %,$(ARCH)),)
7675 $(error "Android ARCH must be set to ARCH=x86_64 or ARCH=arm64-v8a")
7776 endif
77+ # Set ANDROID_NDK path to find android build tools
78+ # e.g. on MacOS: export ANDROID_NDK=/Users/username/Library/Android/sdk/ndk/25.2.9519653
79+ ifeq ($(filter %,$(ANDROID_NDK)),)
80+ $(error "Android NDK must be set")
81+ endif
7882
7983 HOST = $(shell uname -s | tr '[:upper:]' '[:lower:]')
80- BIN = $$ ANDROID_NDK/toolchains/llvm/prebuilt/$(HOST ) -x86_64/bin
84+ BIN = $( ANDROID_NDK ) /toolchains/llvm/prebuilt/$(HOST ) -x86_64/bin
8185
8286 ifneq (,$(filter $(ARCH),arm64 arm64-v8a))
8387 override ARCH := aarch64
@@ -258,13 +262,13 @@ clean:
258262help :
259263 @echo " SQLite Sync Extension Makefile"
260264 @echo " Usage:"
261- @echo " make [PLATFORM=platform] [ARCH=arch] [target]"
265+ @echo " make [PLATFORM=platform] [ARCH=arch] [ANDROID_NDK= \$ $ANDROID_HOME /ndk/26.1.10909125] [ target]"
262266 @echo " "
263267 @echo " Platforms:"
264268 @echo " linux (default on Linux)"
265269 @echo " macos (default on macOS)"
266270 @echo " windows (default on Windows)"
267- @echo " android (needs ARCH to be set to x86_64 or arm64-v8a)"
271+ @echo " android (needs ARCH to be set to x86_64 or arm64-v8a and ANDROID_NDK to be set )"
268272 @echo " ios (only on macOS)"
269273 @echo " isim (only on macOS)"
270274 @echo " "
0 commit comments