Skip to content

Instantly share code, notes, and snippets.

@dcarrith
Created February 27, 2015 19:48
Show Gist options
  • Save dcarrith/899047f3a2d603b25a58 to your computer and use it in GitHub Desktop.
Save dcarrith/899047f3a2d603b25a58 to your computer and use it in GitHub Desktop.
fPIC Patch file for the main Makefile for lua-5.3.0
--- Makefile 2014-10-29 19:14:41.000000000 -0400
+++ Makefile.patched 2015-02-27 14:19:23.077739861 -0500
@@ -38,21 +38,21 @@
# Convenience platforms targets.
PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris
+# Lua version and release.
+V= 5.3
+R= $V.0
+
# 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.
-V= 5.3
-R= $V.0
-
# Targets start here.
all: $(PLAT)
$(PLATS) clean:
- cd src && $(MAKE) $@
+ cd src && $(MAKE) $@ V=$(V) R=$(R)
test: dummy
src/lua -v
@@ -63,6 +63,8 @@
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
+ ln -s $(INSTALL_LIB)/liblua.so.$(R) $(INSTALL_LIB)/liblua.so.$(V)
+ ln -s $(INSTALL_LIB)/liblua.so.$(R) $(INSTALL_LIB)/liblua.so
uninstall:
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment