51b8111
--- libpcap-0.9.7/Makefile.in.shared	2007-07-24 04:35:15.000000000 +0200
51b8111
+++ libpcap-0.9.7/Makefile.in	2007-07-24 14:52:43.000000000 +0200
cc1bd62
@@ -22,6 +22,7 @@
cc1bd62
 #
cc1bd62
 # Various configurable paths (remember to edit Makefile.in, not Makefile)
cc1bd62
 #
cc1bd62
+VERSION := $(shell cat VERSION)
cc1bd62
 
cc1bd62
 # Top level hierarchy
cc1bd62
 prefix = @prefix@
51b8111
@@ -97,9 +98,14 @@ TAGHDR = \
cc1bd62
 TAGFILES = \
cc1bd62
 	$(SRC) $(HDR) $(TAGHDR)
cc1bd62
 
cc1bd62
-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
cc1bd62
 
cc1bd62
-all: libpcap.a
cc1bd62
+
cc1bd62
+CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so.$(VERSION)
cc1bd62
+
cc1bd62
+all: libpcap.a libpcap.so.$(VERSION)
cc1bd62
+
cc1bd62
+libpcap.so.$(VERSION): $(OBJ)
cc1bd62
+	gcc -shared -Wl,-soname -Wl,libpcap.so.$(SOVERSION) -o libpcap.so.$(VERSION) $(OBJ) 
cc1bd62
 
cc1bd62
 libpcap.a: $(OBJ)
cc1bd62
 	@rm -f $@
51b8111
@@ -172,10 +178,13 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt
cc1bd62
 bpf_filter.o: bpf_filter.c
cc1bd62
 	$(CC) $(CFLAGS) -c bpf_filter.c
cc1bd62
 
cc1bd62
-install: libpcap.a 
cc1bd62
+install: libpcap.a libpcap.so.$(VERSION)
cc1bd62
 	[ -d $(DESTDIR)$(libdir) ] || \
cc1bd62
 	    (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
cc1bd62
 	$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
cc1bd62
+	$(INSTALL_PROGRAM) libpcap.so.$(VERSION)  $(DESTDIR)$(libdir)/libpcap.so.$(VERSION)
cc1bd62
+	ln -sf libpcap.so.$(VERSION) $(DESTDIR)$(libdir)/libpcap.so.$(SOVERSION)
cc1bd62
+	ln -sf libpcap.so.$(SOVERSION) $(DESTDIR)$(libdir)/libpcap.so
cc1bd62
 	$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
cc1bd62
 	[ -d $(DESTDIR)$(includedir) ] || \
cc1bd62
 	    (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))