--- lua-5.0.3/Makefile.old 2006-10-04 12:03:57.117024736 +0200 +++ lua-5.0.3/Makefile 2006-10-04 12:05:18.295969396 +0200 @@ -38,8 +38,8 @@ # shared libraries (for Linux) so: - ld -o lib/liblua.so.$V -shared src/*.o - ld -o lib/liblualib.so.$V -shared src/lib/*.o + $(CC) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.lo + $(CC) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.lo cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so # binaries using shared libraries --- lua-5.0.3/src/Makefile.old 2006-10-08 18:11:47.797976922 +0200 +++ lua-5.0.3/src/Makefile 2006-10-08 19:31:46.505995222 +0200 @@ -67,9 +67,14 @@ lvm.h \ lzio.h +SOBJS=$(OBJS:.o=.lo) + +%.lo: %.c + $(CC) $(CFLAGS) -fPIC -DPIC -o $@ -c $< + T= $(LIB)/liblua.a -all: $T +all: $T $(SOBJS) $T: $(OBJS) $(AR) $@ $(OBJS) --- lua-5.0.3/src/lib/Makefile.old 2006-10-08 18:15:26.441697217 +0200 +++ lua-5.0.3/src/lib/Makefile 2006-10-08 19:32:13.781586082 +0200 @@ -9,9 +9,14 @@ OBJS= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o ltablib.o lstrlib.o loadlib.o SRCS= lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c ltablib.c lstrlib.c loadlib.c +SOBJS=$(OBJS:.o=.lo) + +%.lo: %.c + $(CC) $(CFLAGS) -fPIC -DPIC -o $@ -c $< + T= $(LIB)/liblualib.a -all: $T +all: $T $(SOBJS) $T: $(OBJS) $(AR) $@ $(OBJS)