scripts: add -l option for host-build-all

Enable host lib install into local folder.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2018-09-26 11:30:25 +08:00
parent 81eae8886a
commit eb6e9a6a2c
1 changed files with 20 additions and 3 deletions

View File

@ -1,15 +1,32 @@
#!/bin/sh
#!/bin/bash
# fail on any errors
set -e
# parse the args
for args in $@
do
if [[ "$args" == "-l" ]]
then
BUILD_LOCAL=1
fi
done
# run autogen.sh
./autogen.sh
# build all images for all targets.
pwd=`pwd`
# Build library for host platform architecture
./configure --with-arch=host --enable-library=yes --host=x86_64-unknown-linux-gnu
if [[ "x$BUILD_LOCAL" == "x" ]]
then
./configure --with-arch=host --enable-library=yes --host=x86_64-unknown-linux-gnu
else
# make sure host lib is build in local folder
echo "BUILD in local folder!"
rm -rf $pwd/local/
./configure --with-arch=host --enable-library=yes --host=x86_64-unknown-linux-gnu --prefix=$pwd/host-lib
fi
make
make install