Commit 3e2f2006 authored by sebt3's avatar sebt3

Initial upload

parent f6336f0f
#!/bin/sh
# Where you store your pyra's projects
export PROJECTS_BASEDIR=${PROJECTS_BASEDIR:-"$HOME/projects/pyra"}
# Local storage for PNDs
export DBPS_TARGETDIR=${DBPS_TARGETDIR:-"$PROJECTS_BASEDIR/DBPs"}
# Build target and dbp moint point
export PYRA_BASEDIR=${PYRA_BASEDIR:-"/mnt/dbp/images"}
export TOOLCHAIN_ROOT=${TOOLCHAIN_ROOT:-"/usr/local/pyra"}
export PYRA_ROOTFS=${PYRA_ROOTFS:-"$TOOLCHAIN_ROOT/rootfs"}
export CMAKETOOLCHAINFILE="$TOOLCHAIN_ROOT/toolchain.cmake"
export TARGET_SYS=arm-linux-gnueabihf
export CXXFLAGS="$CXX_DEFINES --sysroot=$PYRA_ROOTFS -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard -marm -mthumb-interwork -ftree-vectorize -fsigned-char $CXXFLAGS_ADD -I$PYRA_ROOTFS/usr/include"
export CPPFLAGS="$CXXFLAGS" CFLAGS="$CXXFLAGS"
export CROSSTOOL="$TARGET_SYS"
export CXX=$CROSSTOOL-g++ CC=$CROSSTOOL-gcc AR=$CROSSTOOL-ar AS=$CROSSTOOL-as RANLIB=$CROSSTOOL-ranlib STRIP=$CROSSTOOL-strip
export LDFLAGS="--sysroot=$PYRA_ROOTFS -L$PYRA_ROOTFS/usr/lib -Wl,-rpath,$PYRA_ROOTFS/usr/lib"
export LIBTOOL_SYSROOT_PATH=$PYRA_ROOTFS
export PKG_CONFIG_SYSROOT_DIR=$PYRA_ROOTFS
export PKG_CONFIG_PATH=$PYRA_ROOTFS/usr/lib/pkgconfig
export CPATH="$PYRA_ROOTFS/usr/include:$CPATH"
export PATH="$TOOLCHAIN_ROOT/bin:$PATH"
export HOST_CC=gcc HOST_CXX=g++
addfastmath() {
export CXXFLAGS="$CXXFLAGS -O3 -ffast-math"
export CPPFLAGS="$CXXFLAGS" CFLAGS="$CXXFLAGS"
}
pyra_unset() {
unset LIBTOOL_SYSROOT_PATH PKG_CONFIG_PATH CPATH CFLAGS CXXFLAGS LDFLAGS CROSSTOOL CXX CC AR AS RANLIB HOST_CC HOST_CXX PRJ
}
pyra_setprj() {
export PRJ=$1;
if [ ! -z "$PRJ" ];then
export LDFLAGS="-L$PYRA_BASEDIR/$PRJ/lib -Wl,-rpath,$PYRA_BASEDIR/$PRJ/lib $LDFLAGS" CXXFLAGS="$CXXFLAGS -I$PYRA_BASEDIR/$PRJ/include" PKG_CONFIG_PATH="$PYRA_BASEDIR/$PRJ/lib/pkgconfig:$PKG_CONFIG_PATH" CPATH="$PYRA_BASEDIR/$PRJ/include:$PYRA_ROOTFS/usr/include"
if [ -d $PROJECTS_BASEDIR/$PRJ ];then
cd $PROJECTS_BASEDIR/$PRJ
fi
fi
}
# Help to configure stuff
#-------------------------
pyra_configure() {
if [ -z "$PRJ" ];then
echo "You should Configure your project (using the setprj <project> command)"
./configure --host=$TARGET_SYS $@
else
./configure --host=$TARGET_SYS --prefix=$PYRA_BASEDIR/$PRJ $@
fi
}
pyra_cmake() {
if [ -z "$PRJ" ];then
echo "You should Configure your project (using the setprj <project> command)"
SDLDIR="${PYRA_ROOTFS}/usr" cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKETOOLCHAINFILE $@
else
SDLDIR="${PYRA_ROOTFS}/usr" cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKETOOLCHAINFILE -DPRJ_PREFIX=$PYRA_BASEDIR/$PRJ -DCMAKE_INSTALL_PREFIX=$PYRA_BASEDIR/$PRJ $@
fi
}
#pndqmake() {
# qmake-qt4 -spec $TOOLCHAIN_ROOT/arm/share/qt4/mkspecs/linux-pandora-g++ $@
#}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment