Files
mpp/build/linux/arm/make-Makefiles.bash
Yandong Lin c04a24f0e1 feat[build]: Add --toolchain to config toolchain for linux
for example
./make-Makefiles.bash --toolchain gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-

Change-Id: I4804b1e1759aab04f715d826fbe412087298cb89
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-14 10:36:28 +00:00

38 lines
713 B
Bash
Executable File

#!/bin/bash
# Run this from within a bash shell
set +e
MPP_PWD=`pwd`
MPP_TOP=${MPP_PWD}/../../..
# toolchain detection
check_cmd(){
"$@" >> /dev/null 2>&1
}
check_system_arm_linux_gcc(){
check_cmd arm-linux-gcc -v
}
source ../opt_proc.sh
check_system_arm_linux_gcc
if [ $? -eq 127 ];then
MPP_TOOLCHAIN=${MPP_TOP}/../prebuilts/toolschain/usr/bin
export PATH=$PATH:${MPP_TOOLCHAIN}
fi
# generate Makefile
cmake -DCMAKE_BUILD_TYPE=Release \
-DTOOLCHAIN=${TOOLCHAIN} \
-DCMAKE_TOOLCHAIN_FILE=./arm.linux.cross.cmake \
-DHAVE_DRM=ON \
-G "Unix Makefiles" \
${MPP_TOP}
if [ "${CMAKE_PARALLEL_ENABLE}" = "0" ]; then
cmake --build .
else
cmake --build . -j
fi