代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/cf 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
# Run this file to install libev and lua; if you already have lua and libev in your environment, you can ignore this file and try to compile directly using makefile.
# 运行这个文件可以安装libev与lua; 如果您的环境中已经有了lua/libeio/libev后可以忽略此文件并且直接使用makefile尝试编译.
# This file must be executed in the current folder directory, otherwise the installation will be wrong. Beginners need to keep in mind.
# 必须在当前文件夹目录执行此文件, 否则安装将会出错. 初学者需要谨记.
# Running this script in some embedded environments may lack the scripting tools that should be present (eg ls/printf/grep, etc.), you should find a way to install this command.
# 在一些嵌入式环境下运行此脚本可能会缺少本应存在的脚本工具(如: ls/printf/grep等等), 您应该想办法安装此命令.
# Before executing this build file, you need to make sure that these software environments are installed: gcc/clang autoconf automake make libtool git readline-devel openssl-devel.
# 执行这个编译文件之前需要确保安装了这些软件环境: gcc/clang autoconf automake make libtool git readline-devel openssl-devel. 如果未安装或者缺少安装, 请仔细检查并且自行尝试安装依赖环境.
current=`pwd`
rm -rf build && mkdir build && cd build
# git clone https://gitee.com/CandyMi/lua -b v5.4.3
git clone https://github.com/CandyMi/lua -b v5.4.3
# git clone https://gitee.com/CandyMi/libev -b v4.33
git clone https://github.com/CandyMi/libev -b v4.33
# git clone https://gitee.com/CandyMi/libeio
git clone https://github.com/CandyMi/libeio
echo "========== build libev ==========" &&
cd ${current}/build/libev && sh autogen.sh && ./configure --prefix=/usr/local &&
## 1. 将头文件与库文件放到cf框架目录下(Put the header files and library files in the cf framework directory)
make && cp e*.h ${current}/src && cd .libs && cp $(printf "%s" "`ls | grep libev | grep -v la`") ${current}/
## 2. 将 libev 安装到 /usr/local 区域, 对其进行全局共享库链接. (Install `libev` into the `/usr/local` zone and link it with global shared libraries.)
# make && make install
echo "========== build libeio ==========" &&
cd ${current}/build/libeio && sh autogen.sh && ./configure --prefix=/usr/local &&
## 1. 将头文件与库文件放到cf框架目录下(Put the header files and library files in the cf framework directory)
make && cp e*.h ${current}/src && cd .libs && cp $(printf "%s" "`ls | grep libeio | grep -v la`") ${current}/
## 2. 将 libeio 安装到 /usr/local 区域, 对其进行全局共享库链接. (Install `libeio` into the `/usr/local` zone and link it with global shared libraries.)
# make && make install
echo "========== build lua ==========" &&
cd ${current}/build/lua && make posix MYCFLAGS="-fPIC -DLUA_USE_DLOPEN" MYLIBS="-ldl" &&
## 1. 将头文件与库文件放到cf框架目录下(Put the header files and library files in the cf framework directory)
cp lua.h luaconf.h lualib.h lauxlib.h ${current}/src && cp liblua.* ${current}/
## 2. 将 lua 安装到 /usr/local 区域, 对其进行全局共享库链接. (Install `lua` into the `/usr/local` zone and link it with global shared libraries.)
# cp -rf lua.h luaconf.h lualib.h lauxlib.h /usr/local/include && cp liblua.* /usr/local/lib
echo "Done."
echo "========== clean build ==========" && cd ${current} && rm -rf build
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。