SOURCES: lua51-link.patch (NEW) - build shared lib (but luac must ...

qboosh qboosh at pld-linux.org
Sun Jul 23 13:26:26 CEST 2006


Author: qboosh                       Date: Sun Jul 23 11:26:26 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- build shared lib (but luac must be linked with static one because it uses private symbols)

---- Files affected:
SOURCES:
   lua51-link.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/lua51-link.patch
diff -u /dev/null SOURCES/lua51-link.patch:1.1
--- /dev/null	Sun Jul 23 13:26:26 2006
+++ SOURCES/lua51-link.patch	Sun Jul 23 13:26:21 2006
@@ -0,0 +1,37 @@
+--- lua-5.1.1/src/Makefile.orig	2006-03-22 01:41:49.000000000 +0100
++++ lua-5.1.1/src/Makefile	2006-07-23 12:34:06.101649500 +0200
+@@ -39,23 +39,31 @@
+ ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ ALL_A= $(LUA_A)
+ 
++V=5.1
++
+ default: $(PLAT)
+ 
+-all:	$(ALL_T)
++all:	so $(ALL_T)
++
++so:	liblua.so
+ 
+ o:	$(ALL_O)
+ 
+ a:	$(ALL_A)
+ 
++liblua.so: $(CORE_O) $(LIB_O)
++	$(CC) -o liblua.so.$V -shared $(CORE_O) $(LIB_O) -Wl,-soname=liblua.so.$V -lm -ldl
++	ln -sf liblua.so.$V liblua.so
++
+ $(LUA_A): $(CORE_O) $(LIB_O)
+ 	$(AR) $@ $?
+ 	$(RANLIB) $@
+ 
+ $(LUA_T): $(LUA_O) $(LUA_A)
+-	$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++	$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) -L. -llua $(LIBS)
+ 
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
+-	$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
++	$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+ 
+ clean:
+ 	$(RM) $(ALL_T) $(ALL_O)
================================================================


More information about the pld-cvs-commit mailing list