Ai
1 Star 0 Fork 138

大湿胸/xmake

forked from tboox/xmake 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
ruki 提交于 2015-06-18 13:41 +08:00 . add cfuncs for target and fix parse argv bug
#!/bin/bash
# is debug?
debug=n
verbose=
if [ $1 ]; then
if [ $1 = "--debug" ] || [ $1 = "-d" ]; then
debug=y
verbose=-v
fi
fi
# probe plat
uname=`uname`
if [ $uname = "MSVC" ]; then
plat=msvc
elif [ $uname = "Darwin" ] || [ `uname | egrep -i darwin` ]; then
plat=mac
elif [ $uname = "Linux" ] || [ `uname | egrep -i linux` ]; then
plat=linux
elif [ `uname | egrep -i msys` ]; then
plat=msvc
elif [ `uname | egrep -i cygwin` ]; then
plat=msvc
else
plat=linux
fi
# probe arch
arch=x86
if [ $plat = "linux" ] || [ $plat = "mac" ]; then
if [ `getconf LONG_BIT` = "64" ]; then
arch=x64
fi
fi
# compile xmake-core
echo compiling xmake-core...
cd ./core
if [ -f .config.mak ]; then
rm .config.mak
fi
make f DEBUG=$debug > ../install.log
if [ $? -ne 0 ]; then exit; fi
make c >> ../install.log
make >> ../install.log
if [ $? -ne 0 ]; then
make o
exit;
fi
make i
cd ..
# create the xmake install directory
xmake_dir_install=/usr/local/share/xmake
if [ -d $xmake_dir_install ]; then
sudo rm -rf $xmake_dir_install
fi
if [ ! -d $xmake_dir_install ]; then
sudo mkdir $xmake_dir_install
fi
if [ $? -ne 0 ]; then exit; fi
# install the xmake core file
xmake_core=./core/bin/demo.pkg/bin/$plat/$arch/demo.b
xmake_core_install=$xmake_dir_install/xmake
sudo cp $xmake_core $xmake_core_install
sudo chmod 777 $xmake_core_install
if [ $? -ne 0 ]; then exit; fi
# install the xmake directory
sudo cp -r ./xmake/* $xmake_dir_install/
if [ $? -ne 0 ]; then exit; fi
# make the xmake loader
xmake_loader=/tmp/xmake_loader
echo "#!/bin/bash" > $xmake_loader
echo "export XMAKE_PROGRAM_DIR=$xmake_dir_install" >> $xmake_loader
echo "$xmake_core_install $verbose \"\$@\"" >> $xmake_loader
if [ $? -ne 0 ]; then exit; fi
# install the xmake loader
xmake_loader_install=/usr/local/bin/xmake
sudo mv $xmake_loader $xmake_loader_install
sudo chmod 777 $xmake_loader_install
if [ $? -ne 0 ]; then exit; fi
# ok
echo ok!
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/iframework/xmake.git
git@gitee.com:iframework/xmake.git
iframework
xmake
xmake
master

搜索帮助