diff -Naur lua-5.3.2/Makefile lua-5.3.2-p/Makefile --- lua-5.3.2/Makefile 2015-11-18 20:00:04.000000000 +0100 +++ lua-5.3.2-p/Makefile 2016-03-11 15:14:14.729559377 +0100 @@ -4,17 +4,18 @@ # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= # Your platform. See PLATS for possible values. -PLAT= none +PLAT= linux # Where to install. The installation starts in the src and doc directories, # so take care if INSTALL_TOP is not an absolute path. See the local target. # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. -INSTALL_TOP= /usr/local + +INSTALL_TOP= /usr INSTALL_BIN= $(INSTALL_TOP)/bin INSTALL_INC= $(INSTALL_TOP)/include INSTALL_LIB= $(INSTALL_TOP)/lib -INSTALL_MAN= $(INSTALL_TOP)/man/man1 +INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V @@ -41,7 +42,7 @@ # What to install. TO_BIN= lua luac TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp -TO_LIB= liblua.a +TO_LIB= liblua.a liblua.so.$R TO_MAN= lua.1 luac.1 # Lua version and release. @@ -52,7 +53,7 @@ all: $(PLAT) $(PLATS) clean: - cd src && $(MAKE) $@ + cd src && $(MAKE) $@ V=$(V) R=$(R) test: dummy src/lua -v diff -Naur lua-5.3.2/src/luaconf.h lua-5.3.2-p/src/luaconf.h --- lua-5.3.2/src/luaconf.h 2015-10-21 20:17:40.000000000 +0200 +++ lua-5.3.2-p/src/luaconf.h 2016-03-11 14:52:55.006943115 +0100 @@ -188,7 +188,7 @@ #else /* }{ */ -#define LUA_ROOT "/usr/local/" +#define LUA_ROOT "/usr/" #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" #define LUA_PATH_DEFAULT \ diff -Naur lua-5.3.2/src/Makefile lua-5.3.2-p/src/Makefile --- lua-5.3.2/src/Makefile 2015-05-27 13:10:11.000000000 +0200 +++ lua-5.3.2-p/src/Makefile 2016-03-11 14:56:25.475907615 +0100 @@ -4,11 +4,11 @@ # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= # Your platform. See PLATS for possible values. -PLAT= none +PLAT= linux -CC= gcc -std=gnu99 -CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS) -LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS) +CC = gcc -std=gnu99 +CFLAGS = $(MYCFLAGS) -Wall -Wextra -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 $(SYSCFLAGS) +LDFLAGS = $(SYSLDFLAGS) $(MYLDFLAGS) LIBS= -lm $(SYSLIBS) $(MYLIBS) AR= ar rcu @@ -29,6 +29,7 @@ PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris LUA_A= liblua.a +LUA_SO= liblua.so CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ ltm.o lundump.o lvm.o lzio.o @@ -43,7 +44,7 @@ LUAC_O= luac.o ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) +ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) ALL_A= $(LUA_A) # Targets start here. @@ -59,6 +60,12 @@ $(AR) $@ $(BASE_O) $(RANLIB) $@ +$(LUA_SO): $(CORE_O) $(LIB_O) + $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) + ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) + ln -sf $(LUA_SO).$(R) $(LUA_SO) + + $(LUA_T): $(LUA_O) $(LUA_A) $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)