1 # Copyright (c) 1993, 1994, 1995, 1996
2 # The Regents of the University of California. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that: (1) source code distributions
6 # retain the above copyright notice and this paragraph in its entirety, (2)
7 # distributions including binary code include the above copyright notice and
8 # this paragraph in its entirety in the documentation or other materials
9 # provided with the distribution, and (3) all advertising materials mentioning
10 # features or use of this software display the following acknowledgement:
11 # ``This product includes software developed by the University of California,
12 # Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13 # the University nor the names of its contributors may be used to endorse
14 # or promote products derived from this software without specific prior
16 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 # Various configurable paths (remember to edit Makefile.in, not Makefile)
26 exec_prefix = @
exec_prefix@
27 datarootdir
= @datarootdir@
28 # Pathname of directory to install the configure program
30 # Pathname of directory to install the include files
31 includedir = @
includedir@
32 # Pathname of directory to install the library
34 # Pathname of directory to install the man pages
42 # You shouldn't need to edit anything below.
52 DEFS
= @DEFS@ @V_DEFS@
54 ADDLARCHIVEOBJS
= @ADDLARCHIVEOBJS@
57 CFLAGS
= @CFLAGS@
${CROSSFLAGS}
58 LDFLAGS
= @LDFLAGS@
${CROSSFLAGS}
60 V_RPATH_OPT
= @V_RPATH_OPT@
61 DEPENDENCY_CFLAG
= @DEPENDENCY_CFLAG@
65 FULL_CFLAGS
= $(CCOPT
) $(INCLS
) $(DEFS
) $(CFLAGS
)
68 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
69 INSTALL_DATA
= @INSTALL_DATA@
73 # Flex and bison allow you to specify the prefixes of the global symbols
74 # used by the generated parser. This allows programs to use lex/yacc
75 # and link against libpcap. If you don't have flex or bison, get them.
80 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
81 # Also, gcc does not remove the .o before forking 'as', which can be a
82 # problem if you don't own the file but can write to the directory.
85 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/$*.c
87 PSRC
= pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@
88 FSRC
= fad-@V_FINDALLDEVS@.c
90 CSRC
= pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
91 savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
92 bpf_image.c bpf_dump.c
93 GENSRC
= scanner.c grammar.c bpf_filter.c version.c
96 SRC
= $(PSRC
) $(FSRC
) $(CSRC
) $(SSRC
) $(GENSRC
)
98 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
99 # hack the extra indirection
100 OBJ
= $(PSRC
:.c
=.o
) $(FSRC
:.c
=.o
) $(CSRC
:.c
=.o
) $(SSRC
:.c
=.o
) $(GENSRC
:.c
=.o
) $(LIBOBJS
)
142 tests
/capturetest.c \
143 tests
/can_set_rfmon_test.c \
145 tests
/findalldevstest.c \
147 tests
/reactivatetest.c \
148 tests
/selpolltest.c \
152 scanner.h tokdefs.h version.h
157 CLEANFILES
= $(OBJ
) libpcap.
* $(TESTS
) \
158 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENSRC
) $(GENHDR
) \
165 pcap_compile
.3pcap.in \
166 pcap_datalink
.3pcap.in \
167 pcap_dump_open
.3pcap.in \
168 pcap_get_tstamp_precision
.3pcap.in \
169 pcap_list_datalinks
.3pcap.in \
170 pcap_list_tstamp_types
.3pcap.in \
171 pcap_open_dead
.3pcap.in \
172 pcap_open_offline
.3pcap.in \
173 pcap_set_tstamp_precision
.3pcap.in \
174 pcap_set_tstamp_type
.3pcap.in
176 MAN3PCAP_NOEXPAND
= \
177 pcap_activate
.3pcap \
178 pcap_breakloop
.3pcap \
179 pcap_can_set_rfmon
.3pcap \
182 pcap_datalink_name_to_val
.3pcap \
183 pcap_datalink_val_to_name
.3pcap \
185 pcap_dump_close
.3pcap \
186 pcap_dump_file
.3pcap \
187 pcap_dump_flush
.3pcap \
188 pcap_dump_ftell
.3pcap \
191 pcap_findalldevs
.3pcap \
192 pcap_freecode
.3pcap \
193 pcap_get_selectable_fd
.3pcap \
196 pcap_is_swapped
.3pcap \
197 pcap_lib_version
.3pcap \
198 pcap_lookupdev
.3pcap \
199 pcap_lookupnet
.3pcap \
201 pcap_major_version
.3pcap \
203 pcap_offline_filter
.3pcap \
204 pcap_open_live
.3pcap \
205 pcap_set_buffer_size
.3pcap \
206 pcap_set_datalink
.3pcap \
207 pcap_set_immediate_mode
.3pcap \
208 pcap_set_promisc
.3pcap \
209 pcap_set_rfmon
.3pcap \
210 pcap_set_snaplen
.3pcap \
211 pcap_set_timeout
.3pcap \
212 pcap_setdirection
.3pcap \
213 pcap_setfilter
.3pcap \
214 pcap_setnonblock
.3pcap \
215 pcap_snapshot
.3pcap \
217 pcap_statustostr
.3pcap \
218 pcap_strerror
.3pcap \
219 pcap_tstamp_type_name_to_val
.3pcap \
220 pcap_tstamp_type_val_to_name
.3pcap
222 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
225 pcap-savefile.manfile.in
228 pcap-filter.manmisc.in \
229 pcap-linktype.manmisc.in \
230 pcap-tstamp.manmisc.in
236 ChmodBPF
/StartupParameters.plist \
241 Makefile-devel-adds \
252 SUNOS4
/nit_if.o.sparc \
253 SUNOS4
/nit_if.o.sun3 \
254 SUNOS4
/nit_if.o.sun4c
.4.0.3c \
258 bpf
/net
/bpf_filter.c \
297 org.tcpdump.chmod_bpf.plist \
301 pcap-bt-monitor-linux.c \
302 pcap-bt-monitor-linux.h \
305 pcap-canusb-linux.c \
306 pcap-canusb-linux.h \
320 pcap-netfilter-linux.c \
321 pcap-netfilter-linux.h \
342 Win32
/Include
/Gnuc.h \
343 Win32
/Include
/addrinfo.h \
344 Win32
/Include
/bittypes.h \
345 Win32
/Include
/cdecl_ext.h \
346 Win32
/Include
/inetprivate.h \
347 Win32
/Include
/sockstorage.h \
348 Win32
/Include
/arpa
/nameser.h \
349 Win32
/Include
/net
/if.h \
350 Win32
/Include
/net
/netdb.h \
351 Win32
/Include
/net
/paths.h \
352 Win32
/Prj
/libpcap.dsp \
353 Win32
/Prj
/libpcap.dsw \
354 Win32
/Src
/gai_strerror.c \
355 Win32
/Src
/getnetbynm.c \
356 Win32
/Src
/getnetent.c \
358 Win32
/Src
/getservent.c \
359 Win32
/Src
/inet_aton.c \
360 Win32
/Src
/inet_net.c \
361 Win32
/Src
/inet_pton.c
363 all: libpcap.a shared pcap-config
367 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
370 shared
: libpcap.
$(DYEXT
)
374 VER
=`cat $(srcdir)/VERSION`; \
375 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
376 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER $(LDFLAGS
) \
377 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
380 # The following rule succeeds, but the result is untested.
382 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
383 # its full path as the install_name, and with the compatibility and
384 # current version both set to 1. The compatibility version is set to
385 # 1 so that programs built with a newer version of the library will run
386 # against older versions; multi-platform software probably will fail if
387 # it uses APIs added in the newer version, but Mac OS X-specific software
388 # will use weak linking and check at run time whether those APIs are
391 # We also use "A" as the major version, and 1 as the compatibility version,
392 # but set the current version to the value in VERSION, with any non-numeric
393 # stuff stripped off (the compatibility and current version must be of the
394 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
397 libpcap.dylib
: $(OBJ
)
399 VER
=`cat $(srcdir)/VERSION`; \
402 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
403 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) \
404 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
405 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
406 -compatibility_version
$$COMPAT_VER \
407 -current_version
$$CURRENT_VER
410 # The HP-UX linker manual says that the convention for a versioned library
411 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
412 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
415 # The manual also says "library-level versioning" (think "sonames") was
416 # added in HP-UX 10.0.
418 # XXX - this assumes we're using the HP linker, rather than the GNU
419 # linker, even with GCC.
422 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
423 rm -f libpcap.
$$MAJOR_VER
424 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
425 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
426 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
429 # AIX is different from everybody else. A shared library is an archive
430 # library with one or more shared-object components. We still build a
431 # normal static archive library on AIX, for the benefit of the traditional
432 # scheme of building libpcap and tcpdump in subdirectories of the
433 # same directory, with tcpdump statically linked with the libpcap
434 # in question, but we also build a shared library as "libpcap.shareda"
435 # and install *it*, rather than the static library, as "libpcap.a".
437 libpcap.shareda
: $(OBJ
)
439 $(CC
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LDFLAGS
) $(LIBS
)
443 # For platforms that don't support shared libraries (or on which we
444 # don't support shared libraries).
448 scanner.c
: $(srcdir)/scanner.l
450 $(srcdir)/runlex.sh
$(LEX
) -o
$@
$<
452 cat
$(srcdir)/$@.top
$@.bottom
> $@
455 scanner.o
: scanner.c tokdefs.h
456 $(CC
) $(FULL_CFLAGS
) -c scanner.c
461 grammar.c
: $(srcdir)/grammar.y
462 @
rm -f grammar.c tokdefs.h
469 $(CC
) $(FULL_CFLAGS
) -Dyylval
=pcap_lval
-c grammar.c
472 $(CC
) $(FULL_CFLAGS
) -c version.c
474 snprintf.o
: $(srcdir)/missing
/snprintf.c
475 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
477 version.c
: $(srcdir)/VERSION
479 if grep GIT
${srcdir}/VERSION
>/dev
/null
; then \
480 read ver
<${srcdir}/VERSION
; \
481 echo
$$ver | tr
-d
'\012'; \
484 cat
${srcdir}/VERSION
; \
485 fi | sed
-e
's/.*/char pcap_version[] = "&";/' > $@
488 # NOTE: this really is supposed to be static; importing a string
489 # from a shared library does not work very well on many
490 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
491 # so we make the version string static and return it from
492 # a function, which does work.
494 version.h
: $(srcdir)/VERSION
496 if grep GIT
${srcdir}/VERSION
>/dev
/null
; then \
497 read ver
<${srcdir}/VERSION
; \
498 echo
$$ver | tr
-d
'\012'; \
501 cat
${srcdir}/VERSION
; \
502 fi | sed
-e
's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
504 bpf_filter.c
: $(srcdir)/bpf
/net
/bpf_filter.c
506 ln
-s
$(srcdir)/bpf
/net
/bpf_filter.c bpf_filter.c
508 bpf_filter.o
: bpf_filter.c
509 $(CC
) $(FULL_CFLAGS
) -c bpf_filter.c
512 # Generate the pcap-config script.
514 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
515 # for example, the Solaris 9 make man page says
517 # Because make assigns $< and $* as it would for implicit rules
518 # (according to the suffixes list and the directory contents),
519 # they may be unreliable when used within explicit target entries.
521 # and this is an explicit target entry.
523 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
525 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
527 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
532 # Test programs - not built by default, and not installed.
536 capturetest
: tests
/capturetest.c libpcap.a
537 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o capturetest
$(srcdir)/tests
/capturetest.c libpcap.a
$(LIBS
)
539 can_set_rfmon_test
: tests
/can_set_rfmon_test.c libpcap.a
540 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o can_set_rfmon_test
$(srcdir)/tests
/can_set_rfmon_test.c libpcap.a
$(LIBS
)
542 filtertest
: tests
/filtertest.c libpcap.a
543 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o filtertest
$(srcdir)/tests
/filtertest.c libpcap.a
$(LIBS
)
545 findalldevstest
: tests
/findalldevstest.c libpcap.a
546 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o findalldevstest
$(srcdir)/tests
/findalldevstest.c libpcap.a
$(LIBS
)
548 opentest
: tests
/opentest.c libpcap.a
549 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o opentest
$(srcdir)/tests
/opentest.c libpcap.a
$(LIBS
)
551 selpolltest
: tests
/selpolltest.c libpcap.a
552 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o selpolltest
$(srcdir)/tests
/selpolltest.c libpcap.a
$(LIBS
)
554 valgrindtest
: tests
/valgrindtest.c libpcap.a
555 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o valgrindtest
$(srcdir)/tests
/valgrindtest.c libpcap.a
$(LIBS
)
557 install: install-shared install-archive pcap-config
558 [ -d
$(DESTDIR
)$(libdir) ] || \
559 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
560 [ -d
$(DESTDIR
)$(includedir) ] || \
561 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
562 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
563 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
564 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
565 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
566 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
567 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
568 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
569 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
570 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
571 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
572 for i in
$(PUBHDR
); do \
573 $(INSTALL_DATA
) $(srcdir)/$$i \
574 $(DESTDIR
)$(includedir)/$$i; done
575 [ -d
$(DESTDIR
)$(bindir) ] || \
576 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
577 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
578 for i in
$(MAN1
); do \
579 $(INSTALL_DATA
) $(srcdir)/$$i \
580 $(DESTDIR
)$(mandir)/man1
/$$i; done
581 for i in
$(MAN3PCAP_NOEXPAND
); do \
582 $(INSTALL_DATA
) $(srcdir)/$$i \
583 $(DESTDIR
)$(mandir)/man3
/$$i; done
584 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
585 $(INSTALL_DATA
) $$i \
586 $(DESTDIR
)$(mandir)/man3
/$$i; done
587 (cd
$(DESTDIR
)$(mandir)/man3
&& \
588 rm -f pcap_datalink_val_to_description
.3pcap
&& \
589 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
590 pcap_datalink_val_to_description
.3pcap
&& \
591 rm -f pcap_dump_fopen
.3pcap
&& \
592 $(LN_S
) pcap_dump_open
.3pcap pcap_dump_fopen
.3pcap
&& \
593 rm -f pcap_freealldevs
.3pcap
&& \
594 $(LN_S
) pcap_findalldevs
.3pcap pcap_freealldevs
.3pcap
&& \
595 rm -f pcap_perror
.3pcap
&& \
596 $(LN_S
) pcap_geterr
.3pcap pcap_perror
.3pcap
&& \
597 rm -f pcap_sendpacket
.3pcap
&& \
598 $(LN_S
) pcap_inject
.3pcap pcap_sendpacket
.3pcap
&& \
599 rm -f pcap_free_datalinks
.3pcap
&& \
600 $(LN_S
) pcap_list_datalinks
.3pcap pcap_free_datalinks
.3pcap
&& \
601 rm -f pcap_free_tstamp_types
.3pcap
&& \
602 $(LN_S
) pcap_list_tstamp_types
.3pcap pcap_free_tstamp_types
.3pcap
&& \
603 rm -f pcap_dispatch
.3pcap
&& \
604 $(LN_S
) pcap_loop
.3pcap pcap_dispatch
.3pcap
&& \
605 rm -f pcap_minor_version
.3pcap
&& \
606 $(LN_S
) pcap_major_version
.3pcap pcap_minor_version
.3pcap
&& \
607 rm -f pcap_next
.3pcap
&& \
608 $(LN_S
) pcap_next_ex
.3pcap pcap_next
.3pcap
&& \
609 rm -f pcap_open_dead_with_tstamp_precision
.3pcap
&& \
610 $(LN_S
) pcap_open_dead
.3pcap \
611 pcap_open_dead_with_tstamp_precision
.3pcap
&& \
612 rm -f pcap_open_offline_with_tstamp_precision
.3pcap
&& \
613 $(LN_S
) pcap_open_offline
.3pcap pcap_open_offline_with_tstamp_precision
.3pcap
&& \
614 rm -f pcap_fopen_offline
.3pcap
&& \
615 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline
.3pcap
&& \
616 rm -f pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
617 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
618 rm -f pcap_tstamp_type_val_to_description
.3pcap
&& \
619 $(LN_S
) pcap_tstamp_type_val_to_name
.3pcap pcap_tstamp_type_val_to_description
.3pcap
&& \
620 rm -f pcap_getnonblock
.3pcap
&& \
621 $(LN_S
) pcap_setnonblock
.3pcap pcap_getnonblock
.3pcap
)
622 for i in
$(MANFILE
); do \
623 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
624 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
625 for i in
$(MANMISC
); do \
626 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
627 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
629 install-shared
: install-shared-
$(DYEXT
)
630 install-shared-so
: libpcap.so
631 [ -d
$(DESTDIR
)$(libdir) ] || \
632 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
633 VER
=`cat $(srcdir)/VERSION`; \
634 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
635 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
636 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
637 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
638 install-shared-dylib
: libpcap.dylib
639 [ -d
$(DESTDIR
)$(libdir) ] || \
640 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
641 VER
=`cat $(srcdir)/VERSION`; \
643 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
644 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
645 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
646 install-shared-sl
: libpcap.sl
647 [ -d
$(DESTDIR
)$(libdir) ] || \
648 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
649 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
650 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
651 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
652 install-shared-shareda
: libpcap.shareda
654 # AIX shared libraries are weird. They're archive libraries
655 # with one or more shared object components.
657 [ -d
$(DESTDIR
)$(libdir) ] || \
658 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
659 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
662 install-archive
: install-archive-
$(DYEXT
)
663 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
665 # Most platforms have separate suffixes for shared and
666 # archive libraries, so we install both.
668 [ -d
$(DESTDIR
)$(libdir) ] || \
669 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
670 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
671 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
672 install-archive-shareda
:
674 # AIX, however, doesn't, so we don't install the archive
678 uninstall: uninstall-shared
679 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
680 for i in
$(PUBHDR
); do \
681 rm -f
$(DESTDIR
)$(includedir)/$$i; done
682 -rmdir
$(DESTDIR
)$(includedir)/pcap
683 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
684 for i in
$(MAN1
); do \
685 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
686 for i in
$(MAN3PCAP
); do \
687 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
688 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
689 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
690 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
691 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
692 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
693 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
694 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
695 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
696 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
697 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
698 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_dead_with_tstamp_precision
.3pcap
699 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline_with_tstamp_precision
.3pcap
700 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
701 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline_with_tstamp_precision
.3pcap
702 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
703 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_tstamp_type_val_to_description
.3pcap
704 for i in
$(MANFILE
); do \
705 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
706 for i in
$(MANMISC
); do \
707 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
709 uninstall-shared
: uninstall-shared-
$(DYEXT
)
711 VER
=`cat $(srcdir)/VERSION`; \
712 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
713 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
714 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
715 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
716 uninstall-shared-dylib
:
717 VER
=`cat $(srcdir)/VERSION`; \
719 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
720 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
721 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
723 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
724 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
725 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
726 uninstall-shared-shareda
:
727 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
728 uninstall-shared-none
:
734 rm -f Makefile config.cache config.log config.status \
735 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
737 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
738 rm -rf autom4te.cache
741 ctags
-wtd
$(TAGFILES
)
744 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
746 tar cf
- $(CSRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
747 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) | \
748 (cd
$$name; tar xf
-); \
749 tar -c
-z
-f
$$name.
tar.gz
$$name; \
752 depend
: $(GENSRC
) $(GENHDR
) bpf_filter.c
753 $(MKDEP
) -c
$(CC
) -m
$(CFLAGS
) $(DEPENDENCY_CFLAG
) $(DEFS
) $(INCLS
) $(SRC
)