aboutsummaryrefslogtreecommitdiffstats
path: root/main/xdelta3/xdelta3-makefile.patch
blob: f7fc6a657d60cb4380dc9e7c89899d162575fa2b (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
diff -Naur xdelta3.0v-old/Makefile xdelta3.0v/Makefile
--- xdelta3.0v-old/Makefile	2009-03-12 01:44:51.000000000 +0000
+++ xdelta3.0v/Makefile	2009-03-14 17:02:33.000000000 +0000
@@ -4,7 +4,7 @@
 UNAME = $(shell uname)
 CYGWIN = $(findstring CYGWIN, $(UNAME))
 DARWIN = $(findstring Darwin, $(UNAME))
-PYVER = 2.5
+PYVER = 2.6
 
 ifeq ("$(CYGWIN)", "")
 SWIGTGT = xdelta3module.so
@@ -200,6 +200,9 @@
 xdelta3.o: $(SOURCES)
 	$(CC) -O3 $(CFLAGS) -c xdelta3.c $(SWIG_FLAGS) -o xdelta3.o
 
+xdelta3_PIC.o: $(SOURCES)
+	$(CC) -O3 $(CFLAGS) -fPIC -c xdelta3.c $(SWIG_FLAGS) -o xdelta3_PIC.o
+
 xdelta3_wrap.o: xdelta3_wrap.c
 	$(CC) -O3 $(CFLAGS) $(SWIG_FLAGS) \
 	      -DHAVE_CONFIG_H \
@@ -218,8 +221,8 @@
 	cp $(SWIGTGT) /usr/lib/python$(PYVER)/site-packages
 
 ifeq ("$(DARWIN)", "")
-xdelta3module.so: xdelta3_wrap.o xdelta3.o
-	ld -shared xdelta3.o xdelta3_wrap.o \
+xdelta3module.so: xdelta3_wrap.o xdelta3_PIC.o
+	cc -shared xdelta3_PIC.o xdelta3_wrap.o \
 		-o xdelta3module.so \
 		/usr/lib/libpython$(PYVER).so \
 		-lc