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