summaryrefslogtreecommitdiff
path: root/devel/rx/patches/patch-ab
blob: e546e117680d638b251c33ddc3aab3720bb1fc10 (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
$NetBSD: patch-ab,v 1.2 2002/04/16 13:55:30 wiz Exp $

--- rx/Makefile.in.orig	Fri Nov 22 13:47:49 1996
+++ rx/Makefile.in
@@ -59,24 +59,23 @@
 	$(CC) $(ALL_CFLAGS) -DSCM_MAGIC_SNARFER -E $< | grep "^%%%" | sed -e "s/^%%%//" > $@ ; \
 
 .c.o:
-	$(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $<
+	$(LIBTOOL) $(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $<
 
-all: librx.a
+all: librx.la
 
 install: all
 	test -d $(libdir) || mkdir $(libdir)
 	test -d $(includedir) || mkdir $(includedir)
-	$(INSTALL) librx.a $(libdir)/librx.a
-	$(RANLIB) $(libdir)/librx.a
-	$(INSTALL) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h
+	$(LIBTOOL) $(INSTALL) librx.la $(libdir)
+	$(BSD_INSTALL_DATA) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h
 
 
 uninstall:
-	-rm -f $(libdir)/librx.a
+	-$(LIBTOOL) rm -f $(libdir)/librx.la
 	-rm -f $(includedir)/rxposix.h
 
 clean:
-	-rm -f $(libobjs) librx.a  $(opt_objs) 
+	-$(LIBTOOL) rm -f $(libobjs) librx.a  $(opt_objs) 
 
 distclean: clean
 	-rm Makefile config.status config.log rgx.x
@@ -111,10 +110,10 @@
 	rm -rf `cat .fname` .fname
 
 
-librx.a: $(libobjs) $(opt_objs)
-	rm -f librx.a
-	$(AR) $(AR_FLAGS) librx.a $(libobjs) $(opt_objs)
-	$(RANLIB) librx.a
+librx.la: $(libobjs) $(opt_objs)
+	$(LIBTOOL) rm -f librx.la
+	$(LIBTOOL) $(CC) -o $@ $(libobjs:.o=.lo) $(opt_objs:.o=.lo) \
+		-rpath $(libdir) -version-info $(RX_MAJOR):$(RX_MINOR)
 
 
 depends: