summaryrefslogtreecommitdiff
path: root/devel/rx/patches/patch-ab
blob: e12d2cdf4b51551e0a3923128d3326d8d11cb7ee (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
$NetBSD: patch-ab,v 1.4 2009/09/09 17:03:11 joerg 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) --mode=compile $(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)
+	${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(libdir)
+	${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(includedir)
-	$(INSTALL) librx.a $(libdir)/librx.a
-	$(RANLIB) $(libdir)/librx.a
-	$(INSTALL) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h
+	$(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) librx.la ${DESTDIR}$(libdir)
+	$(BSD_INSTALL_DATA) $(srcdir)/inst-rxposix.h ${DESTDIR}$(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,9 @@
 	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) --mode=link $(CC) -o $@ $(libobjs:.o=.lo) $(opt_objs:.o=.lo) \
+		-rpath $(libdir) -version-info $(RX_MAJOR):$(RX_MINOR)
 
 
 depends: