From 471f8a549c0c7de5dfdd2dd38155914d6f644c66 Mon Sep 17 00:00:00 2001 From: Pete Lewis Date: Fri, 18 Mar 2022 11:32:11 -0700 Subject: [PATCH 1/2] .gitignore: remove trailing slash from VrApi ignore rule This allows use of a symlink to the target. It should also ignore directories for those who choose to copy VrApi. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a324b217..c4aed02b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ build -android/app/src/main/cpp/code/VrApi/ +android/app/src/main/cpp/code/VrApi *.swp *tags *~ From d08688b98795ae9e951d625c584b994e637c7bc6 Mon Sep 17 00:00:00 2001 From: Pete Lewis Date: Fri, 18 Mar 2022 11:33:17 -0700 Subject: [PATCH 2/2] Makefile.local picks up ANDROID_SDK_ROOT environment variable, if set. If not set, it falls back to the original paths: * `$(USERHOME)/AppData/Local/Android/Sdk` on Windows * `$(HOME)/Library/Android/sdk` on MacOS * `/opt/AndroidSDK` on Linux This allows users to dictate which SDK root they'd like to use without making local modifications. --- Makefile.local | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.local b/Makefile.local index 34967cb3..6e526f30 100644 --- a/Makefile.local +++ b/Makefile.local @@ -4,18 +4,21 @@ ANDROID_NDK_VERSION=21.1.6352462 UNAME := $(shell uname) ifeq ($(UNAME), Linux) - ANDROID_NDK=/opt/AndroidSDK/ndk/$(ANDROID_NDK_VERSION) + ANDROID_SDK_ROOT?=/opt/AndroidSDK + ANDROID_NDK=$(ANDROID_SDK_ROOT)/ndk/$(ANDROID_NDK_VERSION) ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-$(ANDROID_SDK_VERSION)-clang ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION) ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib else ifeq ($(UNAME), Darwin) - ANDROID_NDK=~/Library/Android/sdk/ndk/$(ANDROID_NDK_VERSION) + ANDROID_SDK_ROOT?=$(HOME)/Library/Android/sdk + ANDROID_NDK=$(ANDROID_SDK_ROOT)/ndk/$(ANDROID_NDK_VERSION) ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-$(ANDROID_SDK_VERSION)-clang ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION) ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android-ranlib else - ANDROID_NDK=C:/Users/simon/AppData/Local/Android/Sdk/ndk/$(ANDROID_NDK_VERSION) + ANDROID_SDK_ROOT?=$(USERPROFILE)/AppData/Local/Android/Sdk + ANDROID_NDK=$(ANDROID_SDK_ROOT)/ndk/$(ANDROID_NDK_VERSION) ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION) ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe