mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-06 01:26:49 +08:00
[build]: Add build script for arm64
Change-Id: I4ed1b62ce5baeb21fd8e9fb0d804d48f8d065698 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
12
build/linux/aarch64/arm.linux.cross.cmake
Normal file
12
build/linux/aarch64/arm.linux.cross.cmake
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
cmake_minimum_required( VERSION 2.6.3 )
|
||||||
|
|
||||||
|
SET(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
SET(CMAKE_C_COMPILER "aarch64-linux-gnu-gcc")
|
||||||
|
SET(CMAKE_CXX_COMPILER "aarch64-linux-gnu-g++")
|
||||||
|
#SET(CMAKE_SYSTEM_PROCESSOR "armv7-a")
|
||||||
|
SET(CMAKE_SYSTEM_PROCESSOR "armv8")
|
||||||
|
|
||||||
|
add_definitions(-fPIC)
|
||||||
|
add_definitions(-DARMLINUX)
|
||||||
|
|
28
build/linux/aarch64/make-Makefiles.bash
Executable file
28
build/linux/aarch64/make-Makefiles.bash
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/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 aarch64-linux-gnu-gcc -v
|
||||||
|
}
|
||||||
|
|
||||||
|
check_system_arm_linux_gcc
|
||||||
|
if [ $? -eq 127 ];then
|
||||||
|
MPP_TOOLCHAIN=/usr/bin
|
||||||
|
export PATH=$PATH:${MPP_TOOLCHAIN}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# generate Makefile
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=./arm.linux.cross.cmake \
|
||||||
|
-DCMAKE_RKPLATFORM_ENABLE=ON \
|
||||||
|
-G "Unix Makefiles" \
|
||||||
|
${MPP_TOP}
|
Reference in New Issue
Block a user