Add toolchain gcc-4.9-rls3895
Change-Id: I074d1ed16182b5c95e714e993f02989814c0e055
diff --git a/build.sh b/build.sh
index 2691cb2..bc4e133 100755
--- a/build.sh
+++ b/build.sh
@@ -10,16 +10,22 @@
export BUILD_LIB_TYPE=shared
# gcc-4.9 / gcc-8.4
-grep "url" ../.git/config | cut -d " " -f 3 | grep "kernel_5.4.195"
+ROOT_DIR=`pwd`
+
+cd ..
+grep "url" .git/config | cut -d " " -f 3 | grep "kernel_5.4.195"
if [ $? -eq "0" ]; then
export BUILD_PLATFORM=asr1806
else
export BUILD_PLATFORM=asr1803
fi
+export BUILD_BRANCH=`git branch | grep "*" | cut -d " " -f 2`
+cd $ROOT_DIR
+
export STAGING_DIR=
-ROOT_DIR=`pwd`
+
#TOOLCHAIN_DIR=$ROOT_DIR/toolchain/$BUILD_PLATFORM
#echo "toolchain : $ROOT_DIR"
diff --git a/mbtk/Make.defines b/mbtk/Make.defines
index ddb0420..55084fc 100755
--- a/mbtk/Make.defines
+++ b/mbtk/Make.defines
@@ -9,11 +9,17 @@
LOCAL_PATH=.
ifeq ($(BUILD_PLATFORM), asr1803)
+ifeq ($(BUILD_BRANCH), rls3895)
+BUILD_TOOLCHAIN_DIR = $(ROOT)/toolchain/gcc-4.9-rls3895
+else
BUILD_TOOLCHAIN_DIR = $(ROOT)/toolchain/gcc-4.9
+endif
CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-uclibcgnueabi-gcc
AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-uclibcgnueabi-ar
else ifeq ($(BUILD_PLATFORM), asr1806)
+
BUILD_TOOLCHAIN_DIR = $(ROOT)/toolchain/gcc-8.4
+
CC=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-gcc
AR=$(BUILD_TOOLCHAIN_DIR)/bin/arm-openwrt-linux-muslgnueabi-ar
else
@@ -25,6 +31,7 @@
$(info BUILD_LIB_TYPE=$(BUILD_LIB_TYPE))
$(info BUILD_PLATFORM=$(BUILD_PLATFORM))
+$(info BUILD_BRANCH=$(BUILD_BRANCH))
$(info ROOT=$(ROOT))
$(info CC=$(CC))
$(info AR=$(AR))
@@ -79,7 +86,11 @@
endif
else
DEFINE += -DMBTK_POLARSSL_SUPPORT
+
+ifeq ($(BUILD_BRANCH), rls3671)
DEFINE += -DMBTK_MP3_SUPPORT
+endif
+
DEFINE += -DMBTK_PLATFORM_ASR1803
ifeq ($(shell echo $(BUILD_PROJECT) | cut -c 1-4), L508)
diff --git a/mbtk/mbtk_lib/Makefile b/mbtk/mbtk_lib/Makefile
index 27e9b8f..216821d 100755
--- a/mbtk/mbtk_lib/Makefile
+++ b/mbtk/mbtk_lib/Makefile
@@ -86,9 +86,13 @@
src/ringbuffer.c
ifeq ($(BUILD_PLATFORM), asr1803)
-LOCAL_SRC_FILES += src/mbtk_mp3_to_wav.c \
+LOCAL_SRC_FILES += \
src/mbtk_audio_alsa.c \
src/mbtk_audio.c
+
+ifeq ($(BUILD_BRANCH), rls3671)
+LOCAL_SRC_FILES += src/mbtk_mp3_to_wav.c
+endif
endif
ifeq ($(MBTK_GNSS_MODE), gnss_6228)