3 @@ -41,7 +41,7 @@ PLATS= guess aix bsd c89 freebsd generic
6 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
8 +TO_LIB= liblua$V.a liblua$V.so.0.0.0
9 TO_MAN= lua$V.1 luac$V.1
11 # Lua version and release.
12 @@ -59,6 +59,9 @@ install: dummy
13 cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
14 cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
15 cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
16 + ln -s liblua$V.so.0.0.0 $(INSTALL_LIB)/liblua$V.so.0.0
17 + ln -s liblua$V.so.0.0.0 $(INSTALL_LIB)/liblua$V.so.0
18 + ln -s liblua$V.so.0.0.0 $(INSTALL_LIB)/liblua$V.so
19 cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
28 -LUAI_FUNC int luaG_getfuncline (const Proto *f, int pc);
29 +LUA_API int luaG_getfuncline (const Proto *f, int pc);
30 LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
32 LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
35 @@ -50,7 +50,7 @@ LUAI_FUNC void luaS_init (lua_State *L);
36 LUAI_FUNC void luaS_remove (lua_State *L, TString *ts);
37 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, int nuvalue);
38 LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
39 -LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
40 +LUA_API TString *luaS_new (lua_State *L, const char *str);
41 LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l);
47 LUAI_FUNC LClosure* luaU_undump (lua_State* L, ZIO* Z, const char* name);
49 /* dump one chunk; from ldump.c */
50 -LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
51 +LUA_API int luaU_dump (lua_State* L, const Proto* f, lua_Writer w,
52 void* data, int strip);
57 @@ -44,7 +44,7 @@ typedef struct Mbuffer {
58 #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0)
61 -LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader,
62 +LUA_API void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader,
64 LUAI_FUNC size_t luaZ_read (ZIO* z, void *b, size_t n); /* read next n bytes */
68 @@ -33,6 +33,7 @@ CMCFLAGS=
69 PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
72 +LUA_SO= liblua$V.so.0.0.0
73 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
74 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
75 BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
76 @@ -44,8 +45,9 @@ LUAC_T= luac$V
79 ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
80 -ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
81 +ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
87 @@ -56,14 +58,25 @@ o: $(ALL_O)
97 -$(LUA_T): $(LUA_O) $(LUA_A)
98 - $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
99 +$(LUA_SO): $(CORE_O) $(LIB_O)
100 + $(CC) -o $@ -Wl,-Bsymbolic-functions -shared -Wl,-soname="$@" $?
101 + ln -fs $@ liblua$V.so.0.0
102 + ln -fs $@ liblua$V.so.0
103 + ln -fs $@ liblua$V.so
105 +$(LUA_T): $(LUA_O) $(LUA_SO)
106 + $(CC) -o $@ -L. -llua$V $(MYLDFLAGS) $(LUA_O) $(LIBS)
108 +$(LUAC_T): $(LUAC_O) $(LUA_SO)
109 + $(CC) -o $@ -L. -llua$V $(MYLDFLAGS) $(LUAC_O) $(LIBS)
111 -$(LUAC_T): $(LUAC_O) $(LUA_A)
112 +$(LUAC_T)-host: $(LUAC_O) $(LUA_A)
113 $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)