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 rpcapd daemon
32 # Pathname of directory to install the include files
33 includedir = @
includedir@
34 # Pathname of directory to install the library
36 # Pathname of directory to install the man pages
44 # You shouldn't need to edit anything below.
54 DEFS
= -DBUILDING_PCAP @DEFS@ @V_DEFS@
56 ADDLARCHIVEOBJS
= @ADDLARCHIVEOBJS@
59 CFLAGS
= @CFLAGS@
${CROSSFLAGS}
60 LDFLAGS
= @LDFLAGS@
${CROSSFLAGS}
62 V_RPATH_OPT
= @V_RPATH_OPT@
63 DEPENDENCY_CFLAG
= @DEPENDENCY_CFLAG@
66 INSTALL_RPCAPD
=@INSTALL_RPCAPD@
69 FULL_CFLAGS
= $(CCOPT
) $(INCLS
) $(DEFS
) $(CFLAGS
)
72 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
73 INSTALL_DATA
= @INSTALL_DATA@
79 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
80 # Also, gcc does not remove the .o before forking 'as', which can be a
81 # problem if you don't own the file but can write to the directory.
84 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/$*.c
86 PSRC
= pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @NETFILTER_SRC@ @DBUS_SRC@
87 FSRC
= @V_FINDALLDEVS@
89 CSRC
= pcap.c inet.c gencode.c optimize.c nametoaddr.c \
90 etherent.c savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
91 bpf_image.c bpf_dump.c
92 GENSRC
= scanner.c grammar.c bpf_filter.c version.c
95 SRC
= $(PSRC
) $(FSRC
) $(CSRC
) $(SSRC
) $(GENSRC
)
97 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
98 # hack the extra indirection
99 OBJ
= $(PSRC
:.c
=.o
) $(FSRC
:.c
=.o
) $(CSRC
:.c
=.o
) $(SSRC
:.c
=.o
) $(GENSRC
:.c
=.o
) $(LIBOBJS
)
106 pcap
/can_socketcan.h \
161 tests
/valgrindtest.c \
162 tests
/capturetest.c \
163 tests
/can_set_rfmon_test.c \
165 tests
/findalldevstest.c \
167 tests
/reactivatetest.c \
171 scanner.h grammar.h pcap_version.h
176 CLEANFILES
= $(OBJ
) libpcap.
* $(TESTS
) \
177 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENSRC
) $(GENHDR
) \
184 pcap_compile
.3pcap.in \
185 pcap_datalink
.3pcap.in \
186 pcap_dump_open
.3pcap.in \
187 pcap_get_tstamp_precision
.3pcap.in \
188 pcap_list_datalinks
.3pcap.in \
189 pcap_list_tstamp_types
.3pcap.in \
190 pcap_open_dead
.3pcap.in \
191 pcap_open_offline
.3pcap.in \
192 pcap_set_tstamp_precision
.3pcap.in \
193 pcap_set_tstamp_type
.3pcap.in
195 MAN3PCAP_NOEXPAND
= \
196 pcap_activate
.3pcap \
197 pcap_breakloop
.3pcap \
198 pcap_can_set_rfmon
.3pcap \
201 pcap_datalink_name_to_val
.3pcap \
202 pcap_datalink_val_to_name
.3pcap \
204 pcap_dump_close
.3pcap \
205 pcap_dump_file
.3pcap \
206 pcap_dump_flush
.3pcap \
207 pcap_dump_ftell
.3pcap \
210 pcap_findalldevs
.3pcap \
211 pcap_freecode
.3pcap \
212 pcap_get_selectable_fd
.3pcap \
215 pcap_is_swapped
.3pcap \
216 pcap_lib_version
.3pcap \
217 pcap_lookupdev
.3pcap \
218 pcap_lookupnet
.3pcap \
220 pcap_major_version
.3pcap \
222 pcap_offline_filter
.3pcap \
223 pcap_open_live
.3pcap \
224 pcap_set_buffer_size
.3pcap \
225 pcap_set_datalink
.3pcap \
226 pcap_set_immediate_mode
.3pcap \
227 pcap_set_promisc
.3pcap \
228 pcap_set_rfmon
.3pcap \
229 pcap_set_snaplen
.3pcap \
230 pcap_set_timeout
.3pcap \
231 pcap_setdirection
.3pcap \
232 pcap_setfilter
.3pcap \
233 pcap_setnonblock
.3pcap \
234 pcap_snapshot
.3pcap \
236 pcap_statustostr
.3pcap \
237 pcap_strerror
.3pcap \
238 pcap_tstamp_type_name_to_val
.3pcap \
239 pcap_tstamp_type_val_to_name
.3pcap
241 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
244 pcap-savefile.manfile.in
247 pcap-filter.manmisc.in \
248 pcap-linktype.manmisc.in \
249 pcap-tstamp.manmisc.in
255 ChmodBPF
/StartupParameters.plist \
262 Makefile-devel-adds \
274 SUNOS4
/nit_if.o.sparc \
275 SUNOS4
/nit_if.o.sun3 \
276 SUNOS4
/nit_if.o.sun4c
.4.0.3c \
280 bpf
/net
/bpf_filter.c \
283 cmake
/preconfigure.cmake \
284 config
/have_siocglifconf.c \
296 gen_version_header.sh \
311 missing
/win_snprintf.c \
326 org.tcpdump.chmod_bpf.plist \
330 pcap-bt-monitor-linux.c \
331 pcap-bt-monitor-linux.h \
346 pcap-netfilter-linux.c \
347 pcap-netfilter-linux.h \
370 tests
/CMakeLists.txt \
372 Win32
/Include
/Gnuc.h \
373 Win32
/Include
/net
/if.h \
374 Win32
/Prj
/wpcap.sln \
375 Win32
/Prj
/wpcap.vcxproj \
376 Win32
/Prj
/wpcap.vcxproj.filters
378 all: libpcap.a shared
$(RPCAPD
) pcap-config
382 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
385 shared
: libpcap.
$(DYEXT
)
389 VER
=`cat $(srcdir)/VERSION`; \
390 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
391 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER $(LDFLAGS
) \
392 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
395 # The following rule succeeds, but the result is untested.
397 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
398 # its full path as the install_name, and with the compatibility and
399 # current version both set to 1. The compatibility version is set to
400 # 1 so that programs built with a newer version of the library will run
401 # against older versions; multi-platform software probably will fail if
402 # it uses APIs added in the newer version, but Mac OS X-specific software
403 # will use weak linking and check at run time whether those APIs are
406 # We also use "A" as the major version, and 1 as the compatibility version,
407 # but set the current version to the value in VERSION, with any non-numeric
408 # stuff stripped off (the compatibility and current version must be of the
409 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
412 libpcap.dylib
: $(OBJ
)
414 VER
=`cat $(srcdir)/VERSION`; \
417 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
418 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) \
419 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
420 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
421 -compatibility_version
$$COMPAT_VER \
422 -current_version
$$CURRENT_VER
425 # The HP-UX linker manual says that the convention for a versioned library
426 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
427 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
430 # The manual also says "library-level versioning" (think "sonames") was
431 # added in HP-UX 10.0.
433 # XXX - this assumes we're using the HP linker, rather than the GNU
434 # linker, even with GCC.
437 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
438 rm -f libpcap.
$$MAJOR_VER
439 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
440 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
441 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
444 # AIX is different from everybody else. A shared library is an archive
445 # library with one or more shared-object components. We still build a
446 # normal static archive library on AIX, for the benefit of the traditional
447 # scheme of building libpcap and tcpdump in subdirectories of the
448 # same directory, with tcpdump statically linked with the libpcap
449 # in question, but we also build a shared library as "libpcap.shareda"
450 # and install *it*, rather than the static library, as "libpcap.a".
452 libpcap.shareda
: $(OBJ
)
454 $(CC
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LDFLAGS
) $(LIBS
)
458 # For platforms that don't support shared libraries (or on which we
459 # don't support shared libraries).
463 scanner.c
: $(srcdir)/scanner.l
464 $(LEX
) -P pcap_
--header-file
=scanner.h
--nounput
-o scanner.c
$<
466 ## Recover from the removal of $@
467 @if
test -f
$@
; then
:; else \
469 $(MAKE
) $(MAKEFLAGS
) scanner.c
; \
472 scanner.o
: scanner.c grammar.h
473 $(CC
) $(FULL_CFLAGS
) -c scanner.c
475 pcap.o
: pcap_version.h
477 grammar.c
: $(srcdir)/grammar.y
478 $(YACC
) -p pcap_
-o grammar.c
-d
$<
480 ## Recover from the removal of $@
481 @if
test -f
$@
; then
:; else \
483 $(MAKE
) $(MAKEFLAGS
) grammar.c
; \
486 grammar.o
: grammar.c scanner.h
487 $(CC
) $(FULL_CFLAGS
) -c grammar.c
489 gencode.o
: $(srcdir)/gencode.c grammar.h scanner.h
490 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/gencode.c
493 $(CC
) $(FULL_CFLAGS
) -c version.c
495 snprintf.o
: $(srcdir)/missing
/snprintf.c
496 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
498 strtok_r.o
: $(srcdir)/missing
/strtok_r.c
499 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strtok_r.c
501 version.c
: $(srcdir)/VERSION
$(srcdir)/gen_version_c.sh
503 # Older programs import this if they want to show the
504 # libpcap version number, rather than calling
505 # pcap_lib_version(), so we need to export it.
508 $(srcdir)/gen_version_c.sh
$(srcdir)/VERSION
$@
510 pcap_version.h
: $(srcdir)/VERSION
$(srcdir)/pcap_version.h.in
$(srcdir)/gen_version_header.sh
512 $(srcdir)/gen_version_header.sh
$(srcdir)/VERSION
$(srcdir)/pcap_version.h.in
$@
514 bpf_filter.c
: $(srcdir)/bpf
/net
/bpf_filter.c
516 ln
-s
$(srcdir)/bpf
/net
/bpf_filter.c bpf_filter.c
518 bpf_filter.o
: bpf_filter.c
519 $(CC
) $(FULL_CFLAGS
) -c bpf_filter.c
522 # Generate the pcap-config script.
524 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
525 # for example, the Solaris 9 make man page says
527 # Because make assigns $< and $* as it would for implicit rules
528 # (according to the suffixes list and the directory contents),
529 # they may be unreliable when used within explicit target entries.
531 # and this is an explicit target entry.
533 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
535 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
537 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
542 # Remote pcap daemon.
548 # Test programs - not built by default, and not installed.
552 capturetest
: tests
/capturetest.c libpcap.a
553 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o capturetest
$(srcdir)/tests
/capturetest.c libpcap.a
$(LIBS
)
555 can_set_rfmon_test
: tests
/can_set_rfmon_test.c libpcap.a
556 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o can_set_rfmon_test
$(srcdir)/tests
/can_set_rfmon_test.c libpcap.a
$(LIBS
)
558 filtertest
: tests
/filtertest.c libpcap.a
559 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o filtertest
$(srcdir)/tests
/filtertest.c libpcap.a
$(LIBS
)
561 findalldevstest
: tests
/findalldevstest.c libpcap.a
562 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o findalldevstest
$(srcdir)/tests
/findalldevstest.c libpcap.a
$(LIBS
)
564 opentest
: tests
/opentest.c libpcap.a
565 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o opentest
$(srcdir)/tests
/opentest.c libpcap.a
$(LIBS
)
567 reactivatetest
: tests
/reactivatetest.c libpcap.a
568 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o reactivatetest
$(srcdir)/tests
/reactivatetest.c libpcap.a
$(LIBS
)
570 selpolltest
: tests
/selpolltest.c libpcap.a
571 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o selpolltest
$(srcdir)/tests
/selpolltest.c libpcap.a
$(LIBS
)
573 valgrindtest
: tests
/valgrindtest.c libpcap.a
574 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o valgrindtest
$(srcdir)/tests
/valgrindtest.c libpcap.a
$(LIBS
)
576 install: install-shared install-archive pcap-config @INSTALL_RPCAPD@
577 [ -d
$(DESTDIR
)$(libdir) ] || \
578 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
579 [ -d
$(DESTDIR
)$(includedir) ] || \
580 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
581 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
582 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
583 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
584 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
585 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
586 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
587 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
588 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
589 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
590 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
591 for i in
$(PUBHDR
); do \
592 $(INSTALL_DATA
) $(srcdir)/$$i \
593 $(DESTDIR
)$(includedir)/$$i; done
594 [ -d
$(DESTDIR
)$(bindir) ] || \
595 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
596 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
597 for i in
$(MAN1
); do \
598 $(INSTALL_DATA
) $(srcdir)/$$i \
599 $(DESTDIR
)$(mandir)/man1
/$$i; done
600 for i in
$(MAN3PCAP_NOEXPAND
); do \
601 $(INSTALL_DATA
) $(srcdir)/$$i \
602 $(DESTDIR
)$(mandir)/man3
/$$i; done
603 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
604 $(INSTALL_DATA
) $$i \
605 $(DESTDIR
)$(mandir)/man3
/$$i; done
606 (cd
$(DESTDIR
)$(mandir)/man3
&& \
607 rm -f pcap_datalink_val_to_description
.3pcap
&& \
608 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
609 pcap_datalink_val_to_description
.3pcap
&& \
610 rm -f pcap_dump_fopen
.3pcap
&& \
611 $(LN_S
) pcap_dump_open
.3pcap pcap_dump_fopen
.3pcap
&& \
612 rm -f pcap_freealldevs
.3pcap
&& \
613 $(LN_S
) pcap_findalldevs
.3pcap pcap_freealldevs
.3pcap
&& \
614 rm -f pcap_perror
.3pcap
&& \
615 $(LN_S
) pcap_geterr
.3pcap pcap_perror
.3pcap
&& \
616 rm -f pcap_sendpacket
.3pcap
&& \
617 $(LN_S
) pcap_inject
.3pcap pcap_sendpacket
.3pcap
&& \
618 rm -f pcap_free_datalinks
.3pcap
&& \
619 $(LN_S
) pcap_list_datalinks
.3pcap pcap_free_datalinks
.3pcap
&& \
620 rm -f pcap_free_tstamp_types
.3pcap
&& \
621 $(LN_S
) pcap_list_tstamp_types
.3pcap pcap_free_tstamp_types
.3pcap
&& \
622 rm -f pcap_dispatch
.3pcap
&& \
623 $(LN_S
) pcap_loop
.3pcap pcap_dispatch
.3pcap
&& \
624 rm -f pcap_minor_version
.3pcap
&& \
625 $(LN_S
) pcap_major_version
.3pcap pcap_minor_version
.3pcap
&& \
626 rm -f pcap_next
.3pcap
&& \
627 $(LN_S
) pcap_next_ex
.3pcap pcap_next
.3pcap
&& \
628 rm -f pcap_open_dead_with_tstamp_precision
.3pcap
&& \
629 $(LN_S
) pcap_open_dead
.3pcap \
630 pcap_open_dead_with_tstamp_precision
.3pcap
&& \
631 rm -f pcap_open_offline_with_tstamp_precision
.3pcap
&& \
632 $(LN_S
) pcap_open_offline
.3pcap pcap_open_offline_with_tstamp_precision
.3pcap
&& \
633 rm -f pcap_fopen_offline
.3pcap
&& \
634 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline
.3pcap
&& \
635 rm -f pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
636 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
637 rm -f pcap_tstamp_type_val_to_description
.3pcap
&& \
638 $(LN_S
) pcap_tstamp_type_val_to_name
.3pcap pcap_tstamp_type_val_to_description
.3pcap
&& \
639 rm -f pcap_getnonblock
.3pcap
&& \
640 $(LN_S
) pcap_setnonblock
.3pcap pcap_getnonblock
.3pcap
)
641 for i in
$(MANFILE
); do \
642 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
643 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
644 for i in
$(MANMISC
); do \
645 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
646 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
648 install-shared
: install-shared-
$(DYEXT
)
649 install-shared-so
: libpcap.so
650 [ -d
$(DESTDIR
)$(libdir) ] || \
651 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
652 VER
=`cat $(srcdir)/VERSION`; \
653 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
654 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
655 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
656 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
657 install-shared-dylib
: libpcap.dylib
658 [ -d
$(DESTDIR
)$(libdir) ] || \
659 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
660 VER
=`cat $(srcdir)/VERSION`; \
662 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
663 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
664 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
665 install-shared-sl
: libpcap.sl
666 [ -d
$(DESTDIR
)$(libdir) ] || \
667 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
668 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
669 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
670 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
671 install-shared-shareda
: libpcap.shareda
673 # AIX shared libraries are weird. They're archive libraries
674 # with one or more shared object components.
676 [ -d
$(DESTDIR
)$(libdir) ] || \
677 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
678 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
681 install-archive
: install-archive-
$(DYEXT
)
682 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
684 # Most platforms have separate suffixes for shared and
685 # archive libraries, so we install both.
687 [ -d
$(DESTDIR
)$(libdir) ] || \
688 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
689 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
690 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
691 install-archive-shareda
:
693 # AIX, however, doesn't, so we don't install the archive
698 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) install
700 uninstall: uninstall-shared uninstall-rpcapd
701 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
702 for i in
$(PUBHDR
); do \
703 rm -f
$(DESTDIR
)$(includedir)/$$i; done
704 -rmdir
$(DESTDIR
)$(includedir)/pcap
705 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
706 for i in
$(MAN1
); do \
707 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
708 for i in
$(MAN3PCAP
); do \
709 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
710 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
711 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
712 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
713 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
714 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
715 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
716 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
717 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
718 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
719 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
720 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_dead_with_tstamp_precision
.3pcap
721 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline_with_tstamp_precision
.3pcap
722 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
723 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline_with_tstamp_precision
.3pcap
724 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
725 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_tstamp_type_val_to_description
.3pcap
726 for i in
$(MANFILE
); do \
727 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
728 for i in
$(MANMISC
); do \
729 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
731 uninstall-shared
: uninstall-shared-
$(DYEXT
)
733 VER
=`cat $(srcdir)/VERSION`; \
734 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
735 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
736 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
737 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
738 uninstall-shared-dylib
:
739 VER
=`cat $(srcdir)/VERSION`; \
741 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
742 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
743 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
745 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
746 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
747 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
748 uninstall-shared-shareda
:
749 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
750 uninstall-shared-none
:
753 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) uninstall
757 cd rpcapd
; $(MAKE
) clean
760 rm -f Makefile config.cache config.log config.status \
761 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
763 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
764 rm -rf autom4te.cache
765 cd rpcapd
; $(MAKE
) distclean
771 ctags
-wtd
$(TAGFILES
)
774 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
776 tar cf
- $(CSRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
777 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) | \
778 (cd
$$name; tar xf
-); \
779 tar -c
-z
-f
$$name.
tar.gz
$$name; \
782 depend
: $(GENSRC
) $(GENHDR
) bpf_filter.c
783 $(MKDEP
) -c
$(CC
) -m
$(CFLAGS
) $(DEPENDENCY_CFLAG
) $(DEFS
) $(INCLS
) $(SRC
)
784 cd rpcapd
; $(MAKE
) depend