summaryrefslogtreecommitdiff
path: root/net/libpcap/patches/patch-ac
blob: 0e721246ac6169370c1d623bcc0322a950549e8e (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
$NetBSD: patch-ac,v 1.2 2006/12/06 21:17:28 schwarz Exp $

--- Makefile.in.orig	2003-12-15 02:35:03.000000000 +0100
+++ Makefile.in	2006-12-06 21:37:05.000000000 +0100
@@ -41,7 +41,7 @@
 # You shouldn't need to edit anything below.
 #
 
-CC = @CC@
+CC = ${LIBTOOL} --mode=compile @CC@
 CCOPT = @V_CCOPT@
 INCLS = -I. @V_INCLS@
 DEFS = @DEFS@ @V_DEFS@
@@ -67,7 +67,8 @@
 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
 # Also, gcc does not remove the .o before forking 'as', which can be a
 # problem if you don't own the file but can write to the directory.
-.c.o:
+.SUFFIXES:	.lo
+.c.lo:
 	@rm -f $@
 	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
 
@@ -77,13 +78,13 @@
 CSRC =	pcap.c inet.c gencode.c optimize.c nametoaddr.c \
 	etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c
 GENSRC = scanner.c grammar.c version.c
-LIBOBJS = @LIBOBJS@
+LIBOBJS = @LTLIBOBJS@
 
 SRC =	$(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
 
 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
 # hack the extra indirection
-OBJ =	$(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
+OBJ =	$(PSRC:.c=.lo) $(FSRC:.c=.lo) $(CSRC:.c=.lo) $(SSRC:.c=.lo) $(GENSRC:.c=.lo) $(LIBOBJS)
 HDR =	pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
 	ethertype.h gencode.h gnuc.h
 GENHDR = \
@@ -97,12 +98,10 @@
 
 CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
 
-all: libpcap.a
+all: libpcap.la
 
-libpcap.a: $(OBJ)
-	@rm -f $@
-	ar rc $@ $(OBJ) $(LIBS)
-	$(RANLIB) $@
+libpcap.la: $(OBJ)
+	${LIBTOOL} --mode=link @CC@ -rpath ${PREFIX}/lib ${LDFLAGS} $(OBJ) -o libpcap.la
 
 shared: libpcap.$(DYEXT)
 
@@ -126,10 +125,10 @@
 	@rm -f $@
 	$(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
 
-scanner.o: scanner.c tokdefs.h
+scanner.lo: scanner.c tokdefs.h
 	$(CC) $(CFLAGS) -c scanner.c
 
-pcap.o: version.h
+pcap.lo: version.h
 
 tokdefs.h: grammar.c
 grammar.c: $(srcdir)/grammar.y
@@ -138,14 +137,14 @@
 	mv y.tab.c grammar.c
 	mv y.tab.h tokdefs.h
 
-grammar.o: grammar.c
+grammar.lo: grammar.c
 	@rm -f $@
 	$(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
 
-version.o: version.c
+version.lo: version.c
 	$(CC) $(CFLAGS) -c version.c
 
-snprintf.o: $(srcdir)/missing/snprintf.c
+snprintf.lo: $(srcdir)/missing/snprintf.c
 	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
 
 version.c: $(srcdir)/VERSION
@@ -167,14 +166,13 @@
 	rm -f bpf_filter.c
 	ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
 
-bpf_filter.o: bpf_filter.c
+bpf_filter.lo: bpf_filter.c
 	$(CC) $(CFLAGS) -c bpf_filter.c
 
-install: libpcap.a 
+install: libpcap.la 
 	[ -d $(DESTDIR)$(libdir) ] || \
 	    (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
-	$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
-	$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
+	${LIBTOOL} --mode=install $(INSTALL_DATA) libpcap.la $(DESTDIR)$(libdir)
 	[ -d $(DESTDIR)$(includedir) ] || \
 	    (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
 	$(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h