代码拉取完成,页面将自动刷新
同步操作将从 合宙Luat/Luat_CSDK_Air202 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#********************************************************#
# Copyright (C), AirM2M Tech. Co., Ltd.
# Author: lifei
# Description: AMOPENAT 开放平台
# Others:
# History:
# Version: Date: Author: Modification:
# V0.1 2012.12.14 lifei 创建文件
#********************************************************#
export ROOT_DIR
export PROJ_NAME
export PROJ_DIR=$ROOT_DIR/project/$PROJ_NAME
export PROJ_BUILD_DIR=$ROOT_DIR/project/$PROJ_NAME/build
export BUILD_DIR=$ROOT_DIR
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# 分析传入的参数
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MAX=$#;
NEED_CLEAN=0
while [ $MAX -gt 0 ]; do
PARAMETER=$(echo $1 | tr '[A-Z' '[a-z]')
if [ "${PARAMETER}" == "clean" ]; then
NEED_CLEAN=1
break
fi
shift
MAX=`expr ${MAX} - 1`
done
set CT_COMPILER=gcc4_xcpu
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# 多核CPU编译优化
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MAKE_J_NUMBER=4
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# MAKEFILE中使用的路径变量定义
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# 工程根目录 ROOT_DIR
if [[ -n "$ROOT_DIR" ]]; then
export SOFT_WORKDIR=$ROOT_DIR
else
echo Pls define ROOT_DIR at cust_build.bat && exit
fi
# 客户路径需要的路径或变量的设置
CUST_BUILD_CFG_FILE=$SOFT_WORKDIR/project/$PROJ_NAME/build/cust_cfg.sh
test -f $CUST_BUILD_CFG_FILE && source $CUST_BUILD_CFG_FILE
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# 编译log文件控制
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# 获取编译输出的路径
LOG_FILE_PATH=$SOFT_WORKDIR/build
#echo LOG_FILE_PATH=${LOG_FILE_PATH}
if [ "${LOG_FILE_PATH}" == "" ]; then
echo "[cust_build.sh] Log file put to ???";
exit
fi
# 根据当前时间,产生不同的文件
#export LOG_FILE=${LOG_FILE_PATH}/build_log_`date "+%Y%m%d%a%H%M"`.log
# OR 每次都使用一个相同的文件
LOG_FILE=${LOG_FILE_PATH}/${PROJ_NAME}_build.log
# 检查存放log的目录是否建立
if [ ! -d ${LOG_FILE_PATH} ]; then
mkdir ${LOG_FILE_PATH}
fi
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# 开始编译
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Make
start_time=`date +%s`
cd $ROOT_DIR
if [ ${NEED_CLEAN} -eq 1 ]; then
make clean
fi
#exit
if [ ${MAKE_J_NUMBER} -gt 1 ]; then
make -j${MAKE_J_NUMBER} 2>&1 | tee ${LOG_FILE}
else
make 2>&1 | tee ${LOG_FILE}
fi
end_time=`date +%s`
time_distance=`expr ${end_time} - ${start_time}`
hour_distance=`expr ${time_distance} / 3600`
hour_remainder=`expr ${time_distance} % 3600`
min_distance=`expr ${hour_remainder} / 60`
sec_distance=`expr ${hour_remainder} % 60`
echo ++++ Build Time: ${hour_distance}:${min_distance}:${sec_distance} ++++
exit
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。