Commit 33bd2b0a authored by sebt3's avatar sebt3
Browse files

Updated environment-setup for easier customisation

parent 67ee1732
......@@ -31,11 +31,14 @@ pyra_addfastmath() {
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_getprjroot() {
echo $PROJECTS_BASEDIR/$PRJ
}
pyra_setprj() {
export PRJ=$1;
if [ ! -z "$PRJ" ];then
export PRJ_ROOT=$PROJECTS_BASEDIR/$PRJ
export PRJ_ROOT=$(pyra_getprjroot)
export PRJ_TARGET=$PRJ_ROOT/target
export LDFLAGS="-L$PRJ_TARGET/lib -Wl,-rpath,$PRJ_TARGET/lib $LDFLAGS" CXXFLAGS="$CXXFLAGS -I$PRJ_TARGET/include" PKG_CONFIG_PATH="$PRJ_TARGET/lib/pkgconfig:$PKG_CONFIG_PATH" CPATH="$PRJ_TARGET/include:$PYRA_ROOTFS/usr/include"
if [ -d "$PROJECTS_BASEDIR/$PRJ" ];then
......@@ -95,13 +98,14 @@ pyra_cmake() {
fi
}
pyra_makeinstall() {
make DESTDIR="$PROJECTS_BASEDIR/$PRJ/target/root" prefix=/ install
make DESTDIR="$(pyra_getprjroot)/target/root" prefix=/ install
}
pyra_makedbp() {
local R=0
cd "$PROJECTS_BASEDIR/$PRJ/target"
chmod -R go+rx "$PROJECTS_BASEDIR/$PRJ/target/root/"
cd "$(pyra_getprjroot)/target"
chmod -R go+rx "$(pyra_getprjroot)/target/root/"
mksquashfs root $PRJ.squash -all-root -force-gid 0;R=$?
if [ $R -ne 0 ];then
echo ERROR: mksquashfs failed
......
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