mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
27 lines
606 B
Bash
Executable File
27 lines
606 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ "armv6l" = `arch` ]; then
|
|
# Native compile on the Raspberry Pi
|
|
mkdir -p build/raspberry/release
|
|
pushd build/raspberry/release
|
|
cmake -DCMAKE_BUILD_TYPE=Release ../../..
|
|
make
|
|
if [ "$1" != "" ]; then
|
|
sudo make install DESTDIR=$1
|
|
else
|
|
sudo make install
|
|
fi
|
|
else
|
|
# Cross compile on a more capable machine
|
|
mkdir -p build/arm-linux/release/
|
|
pushd build/arm-linux/release/
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=Release ../../..
|
|
make -j 6
|
|
|
|
if [ "$1" != "" ]; then
|
|
sudo make install DESTDIR=$1
|
|
fi
|
|
fi
|
|
popd
|
|
|