aboutsummaryrefslogtreecommitdiff
blob: fd59785b238ac1e2ed40c4da53a06ccad39f3965 (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
--- exports/Makefile.orig	2012-06-26 10:24:20.154182394 -0700
+++ exports/Makefile	2012-06-26 10:28:59.894394334 -0700
@@ -106,9 +106,9 @@
 so : ../$(LIBSONAME)
 
 ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
-	$(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
+	$(CC) $(LDFLAGS) -shared \
 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
-	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB)
+	-Wl,--retain-symbols-file=linux.def -Wl,-soname,$(LIBPREFIX).so.$(MAJOR_VERSION) $(EXTRALIB) -o ../$(LIBSONAME)
 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
 	rm -f linktest
 
@@ -119,9 +119,9 @@
 so : ../$(LIBSONAME)
 
 ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c
-	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
+	$(CC) $(LDFLAGS)  -shared \
 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
-	-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB)
+	-Wl,--retain-symbols-file=linux.def $(FEXTRALIB) $(EXTRALIB) -o ../$(LIBSONAME)
 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
 	rm -f linktest
 
@@ -132,14 +132,15 @@
 so : ../$(LIBSONAME)
 
 ../$(LIBSONAME) :
-	$(CC) -shared -o ../$(LIBSONAME) ../$(LIBNAME)
+	$(CC) -shared ../$(LIBNAME) -o ../$(LIBSONAME)
 endif
 
 ifeq ($(OSNAME), SunOS)
 
 so : ../$(LIBSONAME)
-	$(CC) $(CFLAGS)  -shared -o ../$(LIBSONAME) \
-	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB)
+	$(CC) $(LDFLAGS)  -shared  \
+	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive $(EXTRALIB) \
+	-o ../$(LIBSONAME)
 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK.
 	rm -f linktest