预备工作
可以安装readline/ncurses,如果提示有冲突,自行编译安装。
https://blog.csdn.net/quantum7/article/details/106175841
https://blog.csdn.net/quantum7/article/details/106175380
下载
http://www.lua.org/download.html
解压
修改Makefile
修改src/Makefile:
linux: $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-shared -Wl,-E -ldl -lreadline -lncurses"
编译
BUILD_LIBS=${HOME}/build_libs make \ DESTDIR=${BUILD_LIBS}/lib \ CFLAGS=-fPIC \ linux make install