summaryrefslogtreecommitdiff
path: root/databases/gdbm/patches/patch-ab
blob: dbd3412d0dc5882ba43f27c722f743a2303cd859 (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
59
60
61
62
63
64
65
66
$NetBSD: patch-ab,v 1.3 1998/08/10 15:29:40 tv Exp $

--- Makefile.in.orig	Mon Aug 10 11:13:23 1998
+++ Makefile.in	Mon Aug 10 11:22:25 1998
@@ -3,7 +3,7 @@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
-CC = @CC@
+CC = $(LIBTOOL) @CC@
 
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -19,11 +19,10 @@
 LIBS = @LIBS@ -lc
 
 # SunOS users might wish to add '-fpcc-struct-return' to CFLAGS. see INSTALL.
-CFLAGS = -O
-LDFLAGS =
+CPPFLAGS = $(DEFS) -I. -I$(srcdir)
 
 # Common prefix for installation directories
-prefix = /usr/local
+prefix = @prefix@
 exec_prefix = $(prefix)
 binprefix = $(exec_prefix)
 manprefix = $(prefix)
@@ -39,9 +38,6 @@
 
 #### End of system configuration section. ####
 
-.c.o:
-	$(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $<
-
 SHELL = /bin/sh
 
 PROGS = libgdbm.a testgdbm testdbm testndbm tndbm tdbm conv2gdbm
@@ -88,12 +84,12 @@
 
 DISTFILES = $(SRCS) $(HDRS) $(MSCFILES)
 
-all: libgdbm.a
+all: libgdbm.la
 
 progs: $(PROGS)
 
-install: libgdbm.a gdbm.h gdbm.info
-	$(INSTALL_DATA) libgdbm.a $(libdir)/libgdbm.a
+install: libgdbm.la gdbm.h gdbm.info
+	@$(LIBTOOL) $(INSTALL_DATA) libgdbm.la $(libdir)/
 	$(INSTALL_DATA) gdbm.h $(includedir)/gdbm.h
 	$(INSTALL_DATA) $(srcdir)/gdbm.3 $(man3dir)/gdbm.3
 	$(INSTALL_DATA) $(srcdir)/gdbm.info $(infodir)/gdbm.info
@@ -102,10 +98,8 @@
 	$(INSTALL_DATA) $(srcdir)/dbm.h $(includedir)/dbm.h
 	$(INSTALL_DATA) $(srcdir/ndbm.h $(includedir)/ndbm.h
 
-libgdbm.a: $(OBJS) gdbm.h
-	rm -f libgdbm.a
-	ar q libgdbm.a $(OBJS)
-	$(RANLIB) libgdbm.a
+libgdbm.la: $(OBJS) gdbm.h
+	$(CC) -o $@ $(OBJS:.o=.lo) -rpath $(PREFIX)/lib -version-info 1:73
 
 gdbm.h:	gdbm.proto gdbmerrno.h gdbm.proto2
 	rm -f gdbm.h