blob: f9841ed6ba59d69c9fc867ba41b4125f9b88c974 (
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
|
$NetBSD: patch-aa,v 1.3 2013/09/13 09:57:36 jperkin Exp $
Make use of libtool.
--- Makefile.in.orig 2010-12-27 17:35:02.000000000 +0000
+++ Makefile.in
@@ -35,7 +35,7 @@ DIST = COPYING.LGPL udns.h udns.3 dnsg
OBJS = $(SRCS:.c=.o) $(GEN:.c=.o)
LIB = lib$(NAME).a
-LIBFL = -L. -l$(NAME)
+LIBFL = lib$(NAME).la
SOBJS = $(OBJS:.o=.lo)
SOLIB = lib$(NAME)_s.so
@@ -63,10 +63,10 @@ all: static
static: $(LIB) $(UTILS)
staticlib: $(LIB)
$(LIB): $(OBJS)
- -rm -f $@
- $(AR) rv $@ $(OBJS)
+ ${LIBTOOL} --mode=link ${CC} -o ${LIB:.a=.la} ${OBJS:.o=.lo} \
+ ${LDFLAGS} -rpath ${PREFIX}/lib -version-info 0:9
.c.o:
- $(CC) $(CFLAGS) $(CDEFS) -c $<
+ ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) $(CDEFS) -c $<
shared: $(SOLIBV) $(SOUTILS)
sharedlib: $(SOLIBV)
@@ -183,14 +183,14 @@ dnsget.o dnsget.lo: dnsget.c config.h ud
rblcheck.o rblcheck.lo: rblcheck.c config.h udns.h getopt.c
ex-rdns.o ex-rdns.lo: ex-rdns.c udns.h
dnsget: dnsget.o $(LIB)
- $(CC) $(CFLAGS) -o $@ dnsget.o $(LIBFL)
+ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) -o $@ dnsget.o $(LIBFL)
dnsget_s: dnsget.o $(SOLIB)
$(CC) $(CFLAGS) -o $@ dnsget.o $(SOLIBFL)
rblcheck: rblcheck.o $(LIB)
- $(CC) $(CFLAGS) -o $@ rblcheck.o $(LIBFL)
+ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) -o $@ rblcheck.o $(LIBFL)
rblcheck_s: rblcheck.o $(SOLIB)
$(CC) $(CFLAGS) -o $@ rblcheck.o $(SOLIBFL)
ex-rdns: ex-rdns.o $(LIB)
- $(CC) $(CFLAGS) -o $@ ex-rdns.o $(LIBFL)
+ ${LIBTOOL} --mode=link $(CC) $(CFLAGS) -o $@ ex-rdns.o $(LIBFL)
ex-rdns_s: ex-rdns.o $(SOLIB)
$(CC) $(CFLAGS) -o $@ ex-rdns.o $(SOLIBFL)
|