Native build

Changes to allow the Raspberry Pi to natively build the userland.
Assumes that any armv6l (as returned by the arch(1) command)
is a Raspberry Pi and changes the compile accordingly.
Fix for issues #2 and #79
This commit is contained in:
David M. Palmer
2013-09-02 22:08:39 -06:00
committed by popcornmix
parent b58a0498f1
commit 775cf0bb88
2 changed files with 26 additions and 9 deletions

28
buildme
View File

@@ -1,12 +1,26 @@
#/bin/sh
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
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