shithub: openh264

Download patch

ref: 6bf65da869aa5e08f564d7ccd3aee9fc939b4af6
parent: 2f53a08aba00895b3378cff1a3af44a7af53de22
author: Martin Storsjö <[email protected]>
date: Wed Jul 9 07:10:33 EDT 2014

Avoid repeated code for getting the android toolchain prefix

--- a/build/platform-android.mk
+++ b/build/platform-android.mk
@@ -9,19 +9,16 @@
     LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8
     APP_ABI = armeabi-v7a
   endif
-    TOOLCHAINPREFIX = $(shell NDK_PROJECT_PATH=./codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_PREFIX APP_ABI=armeabi)
   ifeq (Yes, $(USE_ASM))
     ASMFLAGS += -march=armv7-a -mfpu=neon
   endif
 else ifeq ($(ARCH), x86)
     APP_ABI = x86
-    TOOLCHAINPREFIX = $(shell NDK_PROJECT_PATH=./codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_PREFIX APP_ABI=x86)
   ifeq (Yes, $(USE_ASM))
     ASMFLAGS += -f elf32
   endif
 else
     APP_ABI = $(ARCH)
-    TOOLCHAINPREFIX = $(shell NDK_PROJECT_PATH=./codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_PREFIX APP_ABI=$(APP_ABI))
 endif
 
 ifndef NDKROOT
@@ -30,6 +27,8 @@
 ifndef TARGET
 $(error TARGET is not set)
 endif
+
+TOOLCHAINPREFIX = $(shell NDK_PROJECT_PATH=./codec/build/android/dec make --no-print-dir -f $(NDKROOT)/build/core/build-local.mk DUMP_TOOLCHAIN_PREFIX APP_ABI=$(APP_ABI))
 
 SYSROOT = $(NDKROOT)/platforms/android-$(NDKLEVEL)/arch-$(ARCH)
 CXX = $(TOOLCHAINPREFIX)g++