summaryrefslogtreecommitdiff
path: root/net/libpcap/files/patch-Makefile.in
blob: e842b44d4e81b4bb905e53bcf24506401ccee702 (plain) (blame)
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
--- Makefile.in.orig	2008-10-28 01:26:13.000000000 +0000
+++ Makefile.in	2009-04-24 13:38:12.000000000 +0100
@@ -311,22 +311,20 @@
 	Win32/Src/inet_net.c \
 	Win32/Src/inet_pton.c
 
-all: libpcap.a pcap-config
+all: libpcap.a libpcap.so.3 pcap-config
 
 libpcap.a: $(OBJ)
 	@rm -f $@
 	$(AR) rc $@ $(OBJ) $(LIBS)
 	$(RANLIB) $@
 
-shared: libpcap.$(DYEXT)
-
 #
 # XXX - this works with GNU ld, but won't necessarily work with native
 # ld on, for example, various SVR4-flavored platforms, or Digital UNIX.
 #
-libpcap.so: $(OBJ)
+libpcap.so.3: $(OBJ)
 	@rm -f $@
-	$(CC) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(OBJ) $(DAGLIBS)
+	$(CC) -shared -Wl,-x -o libpcap.so.3 -Wl,-soname,libpcap.so.3 `lorder $(OBJ) | tsort -q` $(DAGLIBS)
 
 #
 # The following rule succeeds, but the result is untested.
@@ -416,6 +414,8 @@
 install: libpcap.a pcap-config
 	[ -d $(DESTDIR)$(libdir) ] || \
 	    (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
+	$(INSTALL_DATA) libpcap.so.3 $(DESTDIR)$(libdir)/libpcap.so.3
+	ln -fs $(DESTDIR)$(libdir)/libpcap.so.3 $(DESTDIR)$(libdir)/libpcap.so
 	$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
 	$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
 	[ -d $(DESTDIR)$(includedir) ] || \
@@ -445,31 +445,15 @@
 	    $(DESTDIR)$(includedir)/pcap-bpf.h
 	$(INSTALL_DATA) $(srcdir)/pcap-namedb.h \
 	    $(DESTDIR)$(includedir)/pcap-namedb.h
-	$(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
+	$(INSTALL_DATA) pcap-config $(DESTDIR)$(bindir)/pcap-config
+	chmod 755 $(DESTDIR)$(bindir)/pcap-config
 	for i in $(MAN1); do \
 		$(INSTALL_DATA) $(srcdir)/$$i \
 		    $(DESTDIR)$(mandir)/man1/$$i; done
 	for i in $(MAN3PCAP); do \
+		j=$$(echo $$i | sed -e 's/3pcap/3/') ; \
 		$(INSTALL_DATA) $(srcdir)/$$i \
-		    $(DESTDIR)$(mandir)/man3/$$i; done
-	ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
-	ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
-		 $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
+		    $(DESTDIR)$(mandir)/man3/$$j; done
 	for i in $(MANFILE); do \
 		$(INSTALL_DATA) $(srcdir)/`echo $$i | sed 's/.manfile.in/.manfile/'` \
 		    $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done