Skip to content

Commit abac02f

Browse files
robinlindeniphydf
authored andcommitted
WIP: Update ndk to r21
1 parent 6b52f42 commit abac02f

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

scripts/android.mk

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ PREFIX := $(SYSROOT)/usr
77
TOOLCHAIN_FILE := $(SRCDIR)/$(TARGET).cmake
88
PROTOC := $(DESTDIR)/host/bin/protoc
99

10-
export CC := $(TOOLCHAIN)/bin/$(TARGET)-clang
11-
export CXX := $(TOOLCHAIN)/bin/$(TARGET)-clang++
10+
export CC := $(NDK_HOME)/toolchains/llvm/prebuilt/linux-x86_64/bin/$(TARGET)$(NDK_API)-clang
11+
export CXX := $(NDK_HOME)/toolchains/llvm/prebuilt/linux-x86_64/bin/$(TARGET)$(NDK_API)-clang++
12+
13+
#export CC := $(TOOLCHAIN)/bin/$(TARGET)-clang
14+
#export CXX := $(TOOLCHAIN)/bin/$(TARGET)-clang++
1215
export LDFLAGS := -llog
1316
export PKG_CONFIG_LIBDIR:= $(PREFIX)/lib/pkgconfig
1417
export PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig
@@ -33,22 +36,22 @@ $(NDK_HOME):
3336
# This is put into the root dir, not into $(SRCDIR), because it's huge and
3437
# clutters the Travis CI cache.
3538
test -f $(NDK_PACKAGE) || curl -s $(NDK_URL) -o $(NDK_PACKAGE)
36-
7z x $(NDK_PACKAGE) $(foreach x,$(NDK_FILES),'-ir!$(NDK_DIR)/$x') > /dev/null
39+
7z x $(NDK_PACKAGE) $(foreach x,$(NDK_FILES),'-ir!$(NDK_DIR)/$x')
3740
rm -rf $@
3841
mv $(NDK_DIR) $@
3942
@$(POST_RULE)
4043

41-
$(TOOLCHAIN)/AndroidVersion.txt: $(NDK_HOME)
42-
@$(PRE_RULE)
43-
$</build/tools/make_standalone_toolchain.py \
44-
--arch $(NDK_ARCH) \
45-
--install-dir $(@D) \
46-
--api $(NDK_API) \
47-
--force
48-
@$(POST_RULE)
49-
@touch $@
44+
# $(TOOLCHAIN)/AndroidVersion.txt: $(NDK_HOME)
45+
# @$(PRE_RULE)
46+
# $</build/tools/make_standalone_toolchain.py \
47+
# --arch $(NDK_ARCH) \
48+
# --install-dir $(@D) \
49+
# --api $(NDK_API) \
50+
# --force
51+
# @$(POST_RULE)
52+
# @touch $@
5053

51-
$(TOOLCHAIN_FILE): $(TOOLCHAIN)/AndroidVersion.txt
54+
$(TOOLCHAIN_FILE): $(NDK_HOME)
5255
@$(PRE_RULE)
5356
mkdir -p $(@D)
5457
echo 'set(CMAKE_SYSTEM_NAME Linux)' > $@

scripts/common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export LDFLAGS :=
99
export PATH := $(DESTDIR)/host/bin:$(PATH)
1010

1111
# Android NDK
12-
NDK_DIR := android-ndk-r13b
12+
NDK_DIR := android-ndk-r21
1313
NDK_PACKAGE := $(NDK_DIR)-$(shell perl -e 'print $$^O')-x86_64.zip
1414
NDK_URL := http://dl.google.com/android/repository/$(NDK_PACKAGE)
1515

scripts/dependencies.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ $(SRCDIR)/libvpx:
8686

8787
$(TOOLCHAIN)/libvpx.stamp: $(SRCDIR)/libvpx $(TOOLCHAIN_FILE)
8888
@$(PRE_RULE)
89+
echo $(PATH)
90+
mkdir -p $(TOOLCHAIN)/bin
91+
ln -f $(CC) $(TOOLCHAIN)/bin/aarch64-linux-android-gcc
8992
mkdir -p $(BUILDDIR)/$(notdir $<)
9093
cd $(BUILDDIR)/$(notdir $<) && $(SRCDIR)/$(notdir $<)/configure $($(notdir $<)_CONFIGURE)
9194
$(MAKE) -C $(BUILDDIR)/$(notdir $<) install

0 commit comments

Comments
 (0)