@ -13,19 +13,6 @@
DOCKER_IMAGE := tailscale-android-build-amd64-041425-1
export TS_USE_TOOLCHAIN = 1
# Auto-select an NDK from ANDROID_HOME (choose highest version available)
NDK_ROOT ?= $( shell ls -1d $( ANDROID_HOME) /ndk/* 2>/dev/null | sort -V | tail -n 1)
HOST_OS := $( shell uname | tr A-Z a-z)
i f e q ( $( HOST_OS ) , l i n u x )
STRIP_TOOL := $( NDK_ROOT) /toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy
e l s e i f e q ( $( HOST_OS ) , d a r w i n )
STRIP_TOOL := $( NDK_ROOT) /toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-objcopy
e n d i f
$(info Using NDK_ROOT : $( NDK_ROOT ) )
$(info Using STRIP_TOOL : $( STRIP_TOOL ) )
DEBUG_APK := tailscale-debug.apk
RELEASE_AAB := tailscale-release.aab
RELEASE_TV_AAB := tailscale-tv-release.aab
@ -64,6 +51,21 @@ ifeq ($(ANDROID_SDK_ROOT),)
e n d i f
export ANDROID_HOME ?= $( ANDROID_SDK_ROOT)
# Auto-select an NDK from ANDROID_HOME (choose highest version available)
NDK_ROOT ?= $( shell ls -1d $( ANDROID_HOME) /ndk/* 2>/dev/null | sort -V | tail -n 1)
HOST_OS := $( shell uname | tr A-Z a-z)
i f e q ( $( HOST_OS ) , l i n u x )
STRIP_TOOL := $( NDK_ROOT) /toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-objcopy
e l s e i f e q ( $( HOST_OS ) , d a r w i n )
STRIP_TOOL := $( NDK_ROOT) /toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-objcopy
e n d i f
$(info Using ANDROID_HOME : $( ANDROID_HOME ) )
$(info Using NDK_ROOT : $( NDK_ROOT ) )
$(info Using STRIP_TOOL : $( STRIP_TOOL ) )
# Attempt to find Android Studio for Linux configuration, which does not have a
# predetermined location.
ANDROID_STUDIO_ROOT ?= $( shell find ~/android-studio /usr/local/android-studio /opt/android-studio /Applications/Android\ Studio.app $( PROGRAMFILES) /Android/Android\ Studio -type d -maxdepth 1 2>/dev/null | head -n 1)