summaryrefslogtreecommitdiff
path: root/audio/cdparanoia/patches/patch-ca
blob: 98e508d3cc65b0dc853aff61d2e07fd61a105053 (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
50
51
52
53
54
55
56
57
58
$NetBSD: patch-ca,v 1.5 2006/09/03 17:13:30 ben Exp $

--- interface/Makefile.in.orig	1999-12-13 20:27:59.000000000 -0800
+++ interface/Makefile.in
@@ -18,12 +18,10 @@ RANLIB=@RANLIB@
 LIBS = -lm
 CPPFLAGS+=-D_REENTRANT
 
-OFILES = scan_devices.o	common_interface.o cooked_interface.o interface.o\
-	scsi_interface.o smallft.o toc.o test_interface.o
+OFILES = scan_devices.o	common_interface.o interface.o\
+	smallft.o toc.o test_interface.o @EXTRA_OBJS@
 
-export VERSION
-
-all: lib slib
+all: slib
 
 debug: 
 	$(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
@@ -32,26 +30,24 @@ lib:	
 	$(MAKE) libcdda_interface.a CFLAGS="$(OPT)" 
 
 slib:	
-	$(MAKE) lessmessy
-	$(MAKE) libcdda_interface.so CFLAGS="$(OPT) -fpic" 
-	[ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so libcdda_interface.so.0
+	$(MAKE) libcdda_interface.la VERSION=$(VERSION) CFLAGS="$(OPT)" 
 
 test:	
+	$(MAKE) lessmessy
 	$(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)"
 	$(CC) $(DEBUG) -c test.c
-	$(LD) $(DEBUG) test.o $(LDFLAGS) -o cdda_test $(LIBS) libcdda_interface.a
+	$(LIBTOOL) --mode=link $(LD) $(DEBUG) test.o $(LDFLAGS) -o cdda_test $(LIBS) libcdda_interface.la
+
+libcdda_interface.la: 	$(OFILES)	
+	$(LIBTOOL) --mode=link $(CC) -o libcdda_interface.la $(OFILES:.o=.lo) \
+	    -version-info 1:0 -rpath $(PREFIX)/lib $(LDFLAGS)
+
+libcdda_interface.a: 	libcdda_interface.la
 
-libcdda_interface.a: 	$(OFILES)	
-	$(AR) -r libcdda_interface.a $(OFILES)
-	$(RANLIB) libcdda_interface.a
-
-libcdda_interface.so: 	$(OFILES)	
-	$(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES)
-	[ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so.0
-	[ -e libcdda_interface.so ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so
+libcdda_interface.so: 	libcdda_interface.la
 
 .c.o:
-	$(CC) $(CFLAGS) -c $<
+	$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $<
 
 lessmessy:
 	-rm  -f *.o core *~ *.out