1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00
freebsd-ports/net/libpcap/files/patchbase-Makefile.in
Bruce M Simpson aaed6be69d Fix port for values of LIBPCAP_OVERWRITE_BASE which are defined.
PR:		ports/95060
Submitted by:	Craig Leres
2006-08-02 11:22:45 +00:00

39 lines
1.2 KiB
Plaintext

--- Makefile.in.orig Sun Apr 16 17:17:57 2006
+++ Makefile.in Sun Apr 16 17:18:08 2006
@@ -97,22 +97,18 @@
CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
-all: libpcap.a
+all: libpcap.a libpcap.so.2
libpcap.a: $(OBJ)
@rm -f $@
ar rc $@ $(OBJ) $(LIBS)
$(RANLIB) $@
-shared: libpcap.$(DYEXT)
+#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.2: $(OBJ)
@rm -f $@
- ld -shared -o $@.`cat VERSION` $(OBJ)
+ $(CC) -shared -Wl,-x -o libpcap.so.2 -Wl,-soname,libpcap.so.2 `lorder *.o | tsort -q`
# the following rule succeeds, but the result is untested.
libpcap.dylib: $(OBJ)
@@ -173,6 +169,8 @@
install: libpcap.a
[ -d $(DESTDIR)$(libdir) ] || \
(mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
+ $(INSTALL_DATA) libpcap.so.2 $(DESTDIR)$(libdir)/libpcap.so.2
+ ln -fs $(DESTDIR)$(libdir)/libpcap.so.2 $(DESTDIR)$(libdir)/libpcap.so
$(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
$(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
[ -d $(DESTDIR)$(includedir) ] || \