aboutsummaryrefslogtreecommitdiff
path: root/lua/makefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'lua/makefile.patch')
-rw-r--r--lua/makefile.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/lua/makefile.patch b/lua/makefile.patch
new file mode 100644
index 00000000..40301101
--- /dev/null
+++ b/lua/makefile.patch
@@ -0,0 +1,63 @@
+--- old/Makefile
++++ new/Makefile
+@@ -39,9 +39,9 @@
+ PLATS= guess aix bsd c89 freebsd generic ios linux macosx mingw posix solaris
+
+ # What to install.
+-TO_BIN= lua luac
++TO_BIN= lua5.5 luac5.5
+ TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
+-TO_LIB= liblua.a
++TO_LIB= liblua5.5.so.$(R) liblua5.5.so.$(V) liblua5.5.so
+ TO_MAN= lua.1 luac.1
+
+ # Lua version and release.
+@@ -52,7 +52,7 @@
+ all: $(PLAT)
+
+ $(PLATS) help test clean:
+- @cd src && $(MAKE) $@
++ @cd src && $(MAKE) $@ V=$(V) R=$(R)
+
+ install: dummy
+ cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
+--- old/src/Makefile.orig
++++ new/src/Makefile
+@@ -32,19 +32,20 @@
+
+ PLATS= guess aix bsd c89 freebsd generic ios linux macosx mingw posix solaris
+
+-LUA_A= liblua.a
++LUA_A= liblua5.5.a
++LUA_SO= liblua5.5.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
+ LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
+ BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
+
+-LUA_T= lua
++LUA_T= lua5.5
+ LUA_O= lua.o
+
+-LUAC_T= luac
++LUAC_T= luac5.5
+ 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_SO) $(LUA_T) $(LUAC_T)
+ ALL_A= $(LUA_A)
+
+ # Targets start here.
+@@ -59,6 +60,11 @@
+ $(LUA_A): $(BASE_O)
+ $(AR) $@ $(BASE_O)
+ $(RANLIB) $@
++
++$(LUA_SO): $(BASE_O)
++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $^ -lm $(MYLDFLAGS)
++ ln -sf $(LUA_SO).$(R) $(LUA_SO)
++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
+
+ $(LUA_T): $(LUA_O) $(LUA_A)
+ $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+