| 1 | diff -x .svn -ru work/lua-5.1.4/Makefile lua-5.1.4/Makefile |
| 2 | --- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200 |
| 3 | +++ lua-5.1.4/Makefile 2010-11-18 22:30:01.000000000 +0100 |
| 4 | @@ -43,7 +43,7 @@ |
| 5 | # What to install. |
| 6 | TO_BIN= lua luac |
| 7 | TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp |
| 8 | -TO_LIB= liblua.a |
| 9 | +TO_LIB= liblua.5.1.4.dylib |
| 10 | TO_MAN= lua.1 luac.1 |
| 11 | |
| 12 | # Lua version and release. |
| 13 | @@ -64,6 +64,8 @@ |
| 14 | cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) |
| 15 | cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) |
| 16 | cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) |
| 17 | + cd $(INSTALL_LIB) && sudo ln -s liblua.5.1.4.dylib liblua.dylib |
| 18 | + cd $(INSTALL_LIB) && sudo ln -s liblua.5.1.4.dylib liblua.5.1.dylib |
| 19 | |
| 20 | ranlib: |
| 21 | cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB) |
| 22 | diff -x .svn -ru work/lua-5.1.4/src/Makefile lua-5.1.4/src/Makefile |
| 23 | --- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100 |
| 24 | +++ lua-5.1.4/src/Makefile 2010-11-18 22:31:34.000000000 +0100 |
| 25 | @@ -22,7 +22,7 @@ |
| 26 | |
| 27 | PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris |
| 28 | |
| 29 | -LUA_A= liblua.a |
| 30 | +LUA_A= liblua.5.1.4.dylib |
| 31 | CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ |
| 32 | lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ |
| 33 | lundump.o lvm.o lzio.o |
| 34 | @@ -50,9 +50,12 @@ |
| 35 | $(LUA_A): $(CORE_O) $(LIB_O) |
| 36 | $(AR) $@ $? |
| 37 | $(RANLIB) $@ |
| 38 | + $(CC) -dynamiclib -install_name @executable_path/../lib/liblua.5.1.dylib \ |
| 39 | + -compatibility_version 5.1 -current_version 5.1.4 \ |
| 40 | + -o liblua.5.1.4.dylib $^ |
| 41 | |
| 42 | $(LUA_T): $(LUA_O) $(LUA_A) |
| 43 | - $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) |
| 44 | + $(CC) -fno-common -DLUA_USE_LINUX -lreadline -L. -llua.5.1.4 lua.c -o lua |
| 45 | |
| 46 | $(LUAC_T): $(LUAC_O) $(LUA_A) |
| 47 | $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) |
| 48 | @@ -99,7 +102,7 @@ |
| 49 | $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" |
| 50 | |
| 51 | macosx: |
| 52 | - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" |
| 53 | + $(MAKE) all MYCFLAGS="-fno-common -DLUA_USE_LINUX" MYLIBS="-lreadline" |
| 54 | # use this on Mac OS X 10.3- |
| 55 | # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX |
| 56 | |