1 This applies to Lua 5.2 and 5.3.
3 From 7a1b4e0829124976878ca2765a8e546667a92ceb Mon Sep 17 00:00:00 2001
4 From: Leo Famulari <leo@famulari.name>
5 Date: Fri, 30 Oct 2015 19:11:31 -0400
6 Subject: [PATCH] apply existing non-executable library patch and install
7 libraries as executable
11 src/Makefile | 8 +++++++-
12 2 files changed, 10 insertions(+), 4 deletions(-)
14 diff --git a/Makefile b/Makefile
15 index 1aea8e6..bfcfed9 100644
18 @@ -44,7 +44,7 @@ INTERPRETER= lua
20 TO_BIN= $(INTERPRETER) $(COMPILER)
21 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
23 +TO_LIB= liblua.a liblua.so liblua.so.${V}
27 @@ -56,7 +56,7 @@ R= $V.3
31 - cd src && $(MAKE) $@
32 + cd src && $(MAKE) $@ V=$(V) R=$(R)
36 @@ -69,7 +69,7 @@ install: dummy $(TO_PC)
37 cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_PC) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
38 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
39 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
40 - cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
41 + cd src && $(INSTALL_EXEC) $(TO_LIB) $(INSTALL_LIB)
42 cd src && $(INSTALL_DATA) ../$(TO_PC) $(INSTALL_PC)
43 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
45 diff --git a/src/Makefile b/src/Makefile
46 index 7b4b2b7..c86476e 100644
49 @@ -29,6 +29,7 @@ MYOBJS=
50 PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
54 CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
55 lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \
56 ltm.o lundump.o lvm.o lzio.o
57 @@ -43,7 +44,7 @@ LUAC_T= luac
60 ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
61 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
62 +ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
66 @@ -55,6 +56,11 @@ o: $(ALL_O)
70 +$(LUA_SO): $(CORE_O) $(LIB_O)
71 + $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS)
72 + ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
73 + ln -sf $(LUA_SO).$(R) $(LUA_SO)