summaryrefslogtreecommitdiff
path: root/payloads/libpayload/bin/lp.functions
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/bin/lp.functions')
-rw-r--r--payloads/libpayload/bin/lp.functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/payloads/libpayload/bin/lp.functions b/payloads/libpayload/bin/lp.functions
index 3911c42a5b..8d784ebbd4 100644
--- a/payloads/libpayload/bin/lp.functions
+++ b/payloads/libpayload/bin/lp.functions
@@ -35,6 +35,10 @@ warn() {
echo "Warning: $1"
}
+# For in-tree builds, allow to override the libpayload build dir.
+
+_OBJ=${_OBJ:-$BASE/../build}
+
# If the user didn't specify LIBPAYLOAD_PREFIX, then preload it
# with the default prefix value
@@ -48,8 +52,8 @@ fi
if [ -f $BASE/../lib/libpayload.a ]; then
_LIBDIR=$BASE/../lib
-elif [ -f $BASE/../build/libpayload.a ]; then
- _LIBDIR=$BASE/../build
+elif [ -f $_OBJ/libpayload.a ]; then
+ _LIBDIR=$_OBJ
else
_LIBDIR=$LIBPAYLOAD_PREFIX/lib
fi