summaryrefslogtreecommitdiff
blob: a516afd3be94c61c5f2485155f904a593d2ed6ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- 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)