33 lines
606 B
Bash
Executable File
33 lines
606 B
Bash
Executable File
#!/bin/bash
|
|
|
|
rm -f ../Makefile
|
|
ln -s ./build/Makefile ../Makefile
|
|
|
|
CLEANUP_OPT="1"
|
|
|
|
if [ "$1" = "?" ]; then
|
|
echo "usage:"
|
|
echo "$0 [TARGET_TYPE] [NOT_CLEAN]"
|
|
echo "* [TARGET_TYPE] -- Necessary, kl1|kl2|kl3."
|
|
echo "* [NOT_CLEAN] -- Optional, clean or not, 'not_clean' means incremental build, default is cleanup."
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$1x" = "kl3x" ]; then
|
|
. env_kunlun3_tool.sh
|
|
elif [ "$1x" = "kl2x" ]; then
|
|
. env_kunlun2.sh
|
|
else
|
|
. env.sh
|
|
fi
|
|
|
|
set -o errexit
|
|
|
|
if [ "${CLEANUP_OPT}" == "1" ]; then
|
|
make -C .. oem_tool_clean
|
|
fi
|
|
|
|
# build klx oem_tool
|
|
make -C .. oem_tool
|
|
|