| 1 | diff -u -r ../lua-5.3.4/Makefile ./Makefile |
| 2 | --- ../lua-5.3.4/Makefile 2016-12-20 17:26:08.000000000 +0100 |
| 3 | +++ ./Makefile 2017-02-02 01:32:24.472329105 +0100 |
| 4 | @@ -4,17 +4,17 @@ |
| 5 | # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= |
| 6 | |
| 7 | # Your platform. See PLATS for possible values. |
| 8 | -PLAT= none |
| 9 | +PLAT= linux |
| 10 | |
| 11 | # Where to install. The installation starts in the src and doc directories, |
| 12 | # so take care if INSTALL_TOP is not an absolute path. See the local target. |
| 13 | # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with |
| 14 | # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. |
| 15 | -INSTALL_TOP= /usr/local |
| 16 | +INSTALL_TOP= $(PREFIX) |
| 17 | INSTALL_BIN= $(INSTALL_TOP)/bin |
| 18 | INSTALL_INC= $(INSTALL_TOP)/include |
| 19 | INSTALL_LIB= $(INSTALL_TOP)/lib |
| 20 | -INSTALL_MAN= $(INSTALL_TOP)/man/man1 |
| 21 | +INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 |
| 22 | INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V |
| 23 | INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V |
| 24 | |
| 25 | @@ -38,21 +38,21 @@ |
| 26 | # Convenience platforms targets. |
| 27 | PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris |
| 28 | |
| 29 | +# Lua version and release. |
| 30 | +V= 5.3 |
| 31 | +R= $V.4 |
| 32 | + |
| 33 | # What to install. |
| 34 | TO_BIN= lua luac |
| 35 | TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp |
| 36 | -TO_LIB= liblua.a |
| 37 | +TO_LIB= liblua.a liblua.so.$(R) |
| 38 | TO_MAN= lua.1 luac.1 |
| 39 | |
| 40 | -# Lua version and release. |
| 41 | -V= 5.3 |
| 42 | -R= $V.4 |
| 43 | - |
| 44 | # Targets start here. |
| 45 | all: $(PLAT) |
| 46 | |
| 47 | $(PLATS) clean: |
| 48 | - cd src && $(MAKE) $@ |
| 49 | + cd src && $(MAKE) $@ V=$(V) R=$(R) |
| 50 | |
| 51 | test: dummy |
| 52 | src/lua -v |
| 53 | @@ -63,6 +63,8 @@ |
| 54 | cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) |
| 55 | cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) |
| 56 | cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) |
| 57 | + ln -f -s $(INSTALL_LIB)/liblua.so.$(R) $(INSTALL_LIB)/liblua.so.$(V) |
| 58 | + ln -f -s $(INSTALL_LIB)/liblua.so.$(R) $(INSTALL_LIB)/liblua.so |
| 59 | |
| 60 | uninstall: |
| 61 | cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) |