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
41 top_srcdir
= @top_srcdir@
45 # You shouldn't need to edit anything below.
54 SHLIB_CCOPT
= @V_SHLIB_CCOPT@
56 DEFS
= -DBUILDING_PCAP
-Dpcap_EXPORTS @DEFS@ @V_DEFS@
58 ADDLARCHIVEOBJS
= @ADDLARCHIVEOBJS@
61 CFLAGS
= @CFLAGS@
${CROSSFLAGS}
62 LDFLAGS
= @LDFLAGS@
${CROSSFLAGS}
64 V_RPATH_OPT
= @V_RPATH_OPT@
65 DEPENDENCY_CFLAG
= @DEPENDENCY_CFLAG@
67 PTHREAD_LIBS
=@PTHREAD_LIBS@
68 BUILD_RPCAPD
=@BUILD_RPCAPD@
69 INSTALL_RPCAPD
=@INSTALL_RPCAPD@
70 EXTRA_NETWORK_LIBS
=@EXTRA_NETWORK_LIBS@
72 # Standard CFLAGS for building members of a shared library
73 FULL_CFLAGS
= $(CCOPT
) @V_LIB_CCOPT_FAT@
$(SHLIB_CCOPT
) $(INCLS
) $(DEFS
) $(CFLAGS
)
74 CXXFLAGS
= $(CCOPT
) @V_LIB_CCOPT_FAT@
$(SHLIB_CCOPT
) $(INCLS
) $(DEFS
) $(CFLAGS
)
77 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
78 INSTALL_DATA
= @INSTALL_DATA@
82 BISON_BYACC
= @BISON_BYACC@
84 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
85 # Also, gcc does not remove the .o before forking 'as', which can be a
86 # problem if you don't own the file but can write to the directory.
89 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/$*.c
91 PLATFORM_C_SRC
= @PLATFORM_C_SRC@
92 PLATFORM_CXX_SRC
= @PLATFORM_CXX_SRC@
93 MODULE_C_SRC
= @MODULE_C_SRC@
94 REMOTE_C_SRC
= @REMOTE_C_SRC@
95 COMMON_C_SRC
= pcap.c gencode.c optimize.c nametoaddr.c etherent.c \
97 savefile.c sf-pcap.c sf-pcapng.c pcap-common.c \
98 bpf_image.c bpf_filter.c bpf_dump.c
99 GENERATED_C_SRC
= scanner.c grammar.c
102 SRC
= $(PLATFORM_C_SRC
) $(PLATFORM_CXX_SRC
) \
103 $(MODULE_C_SRC
) $(REMOTE_C_SRC
) $(COMMON_C_SRC
) \
106 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
107 # hack the extra indirection, and we have to handle PLATFORM_CXX_SRC
108 # differently from the defines for C source
109 OBJ
= $(PLATFORM_C_SRC
:.c
=.o
) $(PLATFORM_CXX_SRC
:.
cpp=.o
) \
110 $(MODULE_C_SRC
:.c
=.o
) $(REMOTE_C_SRC
:.c
=.o
) $(COMMON_C_SRC
:.c
=.o
) \
111 $(GENERATED_C_SRC
:.c
=.o
) \
120 pcap
/can_socketcan.h \
121 pcap
/compiler-tests.h \
124 pcap
/pcap-inttypes.h \
167 CLEANFILES
= $(OBJ
) libpcap.a libpcap.so.
`cat $(srcdir)/VERSION` \
168 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENERATED_C_SRC
) $(GENHDR
) \
169 lex.yy.c pcap-config libpcap.
pc
175 pcap_compile
.3pcap.in \
176 pcap_datalink
.3pcap.in \
177 pcap_dump_open
.3pcap.in \
178 pcap_get_tstamp_precision
.3pcap.in \
179 pcap_list_datalinks
.3pcap.in \
180 pcap_list_tstamp_types
.3pcap.in \
181 pcap_open_dead
.3pcap.in \
182 pcap_open_offline
.3pcap.in \
183 pcap_set_immediate_mode
.3pcap.in \
184 pcap_set_tstamp_precision
.3pcap.in \
185 pcap_set_tstamp_type
.3pcap.in
187 MAN3PCAP_NOEXPAND
= \
188 pcap_activate
.3pcap \
189 pcap_breakloop
.3pcap \
190 pcap_can_set_rfmon
.3pcap \
193 pcap_datalink_name_to_val
.3pcap \
194 pcap_datalink_val_to_name
.3pcap \
196 pcap_dump_close
.3pcap \
197 pcap_dump_file
.3pcap \
198 pcap_dump_flush
.3pcap \
199 pcap_dump_ftell
.3pcap \
202 pcap_findalldevs
.3pcap \
203 pcap_freecode
.3pcap \
204 pcap_get_required_select_timeout
.3pcap \
205 pcap_get_selectable_fd
.3pcap \
209 pcap_is_swapped
.3pcap \
210 pcap_lib_version
.3pcap \
211 pcap_lookupdev
.3pcap \
212 pcap_lookupnet
.3pcap \
214 pcap_major_version
.3pcap \
216 pcap_offline_filter
.3pcap \
217 pcap_open_live
.3pcap \
218 pcap_set_buffer_size
.3pcap \
219 pcap_set_datalink
.3pcap \
220 pcap_set_promisc
.3pcap \
221 pcap_set_protocol_linux
.3pcap \
222 pcap_set_rfmon
.3pcap \
223 pcap_set_snaplen
.3pcap \
224 pcap_set_timeout
.3pcap \
225 pcap_setdirection
.3pcap \
226 pcap_setfilter
.3pcap \
227 pcap_setnonblock
.3pcap \
228 pcap_snapshot
.3pcap \
230 pcap_statustostr
.3pcap \
231 pcap_strerror
.3pcap \
232 pcap_tstamp_type_name_to_val
.3pcap \
233 pcap_tstamp_type_val_to_name
.3pcap
235 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
238 pcap-savefile.manfile.in
241 pcap-filter.manmisc.in \
242 pcap-linktype.manmisc.in \
243 pcap-tstamp.manmisc.in
248 ChmodBPF
/StartupParameters.plist \
254 Makefile-devel-adds \
256 doc
/README.Win32.md \
264 doc
/README.solaris.md \
272 cmake_uninstall.cmake.in \
274 cmake
/Modules
/FindDAG.cmake \
275 cmake
/Modules
/Finddpdk.cmake \
276 cmake
/Modules
/FindFseeko.cmake \
277 cmake
/Modules
/FindLFS.cmake \
278 cmake
/Modules
/FindPacket.cmake \
279 cmake
/Modules
/FindSNF.cmake \
280 cmake
/Modules
/FindTC.cmake \
281 cmake
/have_siocglifconf.c \
309 missing
/win_asprintf.c \
321 org.tcpdump.chmod_bpf.plist \
327 pcap-bt-monitor-linux.c \
328 pcap-bt-monitor-linux.h \
347 pcap-netfilter-linux.c \
348 pcap-netfilter-linux.h \
373 rpcapd
/CMakeLists.txt \
375 rpcapd
/config_params.h \
382 rpcapd
/org.tcpdump.rpcapd.plist \
385 rpcapd
/rpcapd.inetd.conf \
386 rpcapd
/rpcapd.manadmin.in \
387 rpcapd
/rpcapd-config.manfile.in \
389 rpcapd
/rpcapd.socket \
390 rpcapd
/rpcapd.xinetd.conf \
391 rpcapd
/rpcapd@.service \
399 testprogs
/CMakeLists.txt \
400 testprogs
/Makefile.in \
401 testprogs
/can_set_rfmon_test.c \
402 testprogs
/capturetest.c \
403 testprogs
/filtertest.c \
404 testprogs
/findalldevstest.c \
405 testprogs
/findalldevstest-perf.c \
406 testprogs
/fuzz
/CMakeLists.txt \
407 testprogs
/fuzz
/fuzz_both.c \
408 testprogs
/fuzz
/fuzz_both.options \
409 testprogs
/fuzz
/fuzz_filter.c \
410 testprogs
/fuzz
/fuzz_filter.options \
411 testprogs
/fuzz
/fuzz_pcap.c \
412 testprogs
/fuzz
/fuzz_pcap.options \
413 testprogs
/fuzz
/onefile.c \
414 testprogs
/opentest.c \
415 testprogs
/reactivatetest.c \
416 testprogs
/selpolltest.c \
417 testprogs
/threadsignaltest.c \
419 testprogs
/valgrindtest.c \
420 testprogs
/visopts.py \
421 testprogs
/writecaptest.c \
422 tests
/shb-option-too-long.pcapng
424 all: libpcap.a shared
$(BUILD_RPCAPD
) libpcap.
pc pcap-config
428 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
431 shared
: libpcap.
$(DYEXT
)
435 VER
=`cat $(srcdir)/VERSION`; \
436 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
437 @V_SHLIB_CMD@
$(LDFLAGS
) @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER \
438 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
441 # The following rule succeeds, but the result is untested.
443 # In macOS, the libpcap dylib has the name "libpcap.A.dylib", with its
444 # full path as the install_name, and with the compatibility and current
445 # version both set to 1. The compatibility version is set to 1 so that
446 # programs built with a newer version of the library will run against
447 # older versions if they don't use APIs available in the newer version
448 # but not in the older version.
450 # We also use "A" as the major version, and 1 as the compatibility version,
451 # but set the current version to the value in VERSION, with any non-numeric
452 # stuff stripped off (the compatibility and current version must be of the
453 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
456 libpcap.dylib
: $(OBJ
)
458 VER
=`cat $(srcdir)/VERSION`; \
461 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
462 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) @V_LIB_LDFLAGS_FAT@ \
463 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
464 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
465 -compatibility_version
$$COMPAT_VER \
466 -current_version
$$CURRENT_VER
469 # The HP-UX linker manual says that the convention for a versioned library
470 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
471 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
474 # The manual also says "library-level versioning" (think "sonames") was
475 # added in HP-UX 10.0.
477 # XXX - this assumes we're using the HP linker, rather than the GNU
478 # linker, even with GCC.
481 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
482 rm -f libpcap.
$$MAJOR_VER
483 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
484 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
485 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
488 # AIX is different from everybody else. A shared library is an archive
489 # library with one or more shared-object components. We still build a
490 # normal static archive library on AIX, for the benefit of the traditional
491 # scheme of building libpcap and tcpdump in subdirectories of the
492 # same directory, with tcpdump statically linked with the libpcap
493 # in question, but we also build a shared library as "libpcap.shareda"
494 # and install *it*, rather than the static library, as "libpcap.a".
496 libpcap.shareda
: $(OBJ
)
498 $(CC
) $(LDFLAGS
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LIBS
)
502 # For platforms that don't support shared libraries (or on which we
503 # don't support shared libraries).
507 scanner.c
: $(srcdir)/scanner.l
508 $(LEX
) -P pcap_
--header-file
=scanner.h
--nounput
-o scanner.c
$<
510 ## Recover from the removal of $@
511 @if
test -f
$@
; then
:; else \
513 $(MAKE
) $(MAKEFLAGS
) scanner.c
; \
516 scanner.o
: scanner.c grammar.h
517 $(CC
) $(FULL_CFLAGS
) -c scanner.c
520 # Generate the grammar.y file.
522 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
523 # for example, the Solaris 9 make man page says
525 # Because make assigns $< and $* as it would for implicit rules
526 # (according to the suffixes list and the directory contents),
527 # they may be unreliable when used within explicit target entries.
529 # and this is an explicit target entry.
531 # Therefore, instead of using $<, we explicitly put in $(srcdir)/libpcap.pc.in.
533 grammar.y
: $(srcdir)/grammar.y.in .
/config.status
535 .
/config.status
--file
=$@.tmp
:$(srcdir)/grammar.y.in
539 $(BISON_BYACC
) -p pcap_
-o grammar.c
-d
$<
541 ## Recover from the removal of $@
542 @if
test -f
$@
; then
:; else \
544 $(MAKE
) $(MAKEFLAGS
) grammar.c
; \
547 grammar.o
: grammar.c scanner.h
548 $(CC
) $(FULL_CFLAGS
) -c grammar.c
550 gencode.o
: $(srcdir)/gencode.c grammar.h scanner.h
551 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/gencode.c
553 asprintf.o
: $(srcdir)/missing
/asprintf.c
554 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/asprintf.c
556 snprintf.o
: $(srcdir)/missing
/snprintf.c
557 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
559 strlcat.o
: $(srcdir)/missing
/strlcat.c
560 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcat.c
562 strlcpy.o
: $(srcdir)/missing
/strlcpy.c
563 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcpy.c
565 strtok_r.o
: $(srcdir)/missing
/strtok_r.c
566 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strtok_r.c
569 # Generate the libpcap.pc file.
571 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
572 # for example, the Solaris 9 make man page says
574 # Because make assigns $< and $* as it would for implicit rules
575 # (according to the suffixes list and the directory contents),
576 # they may be unreliable when used within explicit target entries.
578 # and this is an explicit target entry.
580 # Therefore, instead of using $<, we explicitly put in $(srcdir)/libpcap.pc.in.
582 libpcap.
pc: $(srcdir)/libpcap.
pc.in .
/config.status
584 .
/config.status
--file
=$@.tmp
:$(srcdir)/libpcap.
pc.in
588 # Generate the pcap-config script. See above.
590 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
592 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
597 # Remote pcap daemon.
599 build-rpcapd
: libpcap.a
603 # Test programs - not built by default, and not installed.
606 (cd testprogs
; $(MAKE
))
610 install: install-shared install-archive libpcap.
pc pcap-config @INSTALL_RPCAPD@
611 [ -d
$(DESTDIR
)$(libdir) ] || \
612 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
613 [ -d
$(DESTDIR
)$(includedir) ] || \
614 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
615 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
616 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
617 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
618 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
619 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
620 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
621 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
622 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
623 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
624 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
625 for i in
$(PUBHDR
); do \
626 $(INSTALL_DATA
) $(srcdir)/$$i \
627 $(DESTDIR
)$(includedir)/$$i; done
628 [ -d
$(DESTDIR
)$(bindir) ] || \
629 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
630 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
631 [ -d
$(DESTDIR
)$(libdir)/pkgconfig
] || \
632 (mkdir
-p
$(DESTDIR
)$(libdir)/pkgconfig
; chmod
755 $(DESTDIR
)$(libdir)/pkgconfig
)
633 $(INSTALL_DATA
) libpcap.
pc $(DESTDIR
)$(libdir)/pkgconfig
/libpcap.
pc
634 for i in
$(MAN1
); do \
635 $(INSTALL_DATA
) $(srcdir)/$$i \
636 $(DESTDIR
)$(mandir)/man1
/$$i; done
637 for i in
$(MAN3PCAP_NOEXPAND
); do \
638 $(INSTALL_DATA
) $(srcdir)/$$i \
639 $(DESTDIR
)$(mandir)/man3
/$$i; done
640 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
641 $(INSTALL_DATA
) $$i \
642 $(DESTDIR
)$(mandir)/man3
/$$i; done
643 (cd
$(DESTDIR
)$(mandir)/man3
&& \
644 rm -f pcap_datalink_val_to_description
.3pcap
&& \
645 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
646 pcap_datalink_val_to_description
.3pcap
&& \
647 rm -f pcap_datalink_val_to_description_or_dlt
.3pcap
&& \
648 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
649 pcap_datalink_val_to_description_or_dlt
.3pcap
&& \
650 rm -f pcap_dump_fopen
.3pcap
&& \
651 $(LN_S
) pcap_dump_open
.3pcap pcap_dump_fopen
.3pcap
&& \
652 rm -f pcap_freealldevs
.3pcap
&& \
653 $(LN_S
) pcap_findalldevs
.3pcap pcap_freealldevs
.3pcap
&& \
654 rm -f pcap_perror
.3pcap
&& \
655 $(LN_S
) pcap_geterr
.3pcap pcap_perror
.3pcap
&& \
656 rm -f pcap_sendpacket
.3pcap
&& \
657 $(LN_S
) pcap_inject
.3pcap pcap_sendpacket
.3pcap
&& \
658 rm -f pcap_free_datalinks
.3pcap
&& \
659 $(LN_S
) pcap_list_datalinks
.3pcap pcap_free_datalinks
.3pcap
&& \
660 rm -f pcap_free_tstamp_types
.3pcap
&& \
661 $(LN_S
) pcap_list_tstamp_types
.3pcap pcap_free_tstamp_types
.3pcap
&& \
662 rm -f pcap_dispatch
.3pcap
&& \
663 $(LN_S
) pcap_loop
.3pcap pcap_dispatch
.3pcap
&& \
664 rm -f pcap_minor_version
.3pcap
&& \
665 $(LN_S
) pcap_major_version
.3pcap pcap_minor_version
.3pcap
&& \
666 rm -f pcap_next
.3pcap
&& \
667 $(LN_S
) pcap_next_ex
.3pcap pcap_next
.3pcap
&& \
668 rm -f pcap_open_dead_with_tstamp_precision
.3pcap
&& \
669 $(LN_S
) pcap_open_dead
.3pcap \
670 pcap_open_dead_with_tstamp_precision
.3pcap
&& \
671 rm -f pcap_open_offline_with_tstamp_precision
.3pcap
&& \
672 $(LN_S
) pcap_open_offline
.3pcap pcap_open_offline_with_tstamp_precision
.3pcap
&& \
673 rm -f pcap_fopen_offline
.3pcap
&& \
674 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline
.3pcap
&& \
675 rm -f pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
676 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
677 rm -f pcap_tstamp_type_val_to_description
.3pcap
&& \
678 $(LN_S
) pcap_tstamp_type_val_to_name
.3pcap pcap_tstamp_type_val_to_description
.3pcap
&& \
679 rm -f pcap_getnonblock
.3pcap
&& \
680 $(LN_S
) pcap_setnonblock
.3pcap pcap_getnonblock
.3pcap
)
681 for i in
$(MANFILE
); do \
682 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
683 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
684 for i in
$(MANMISC
); do \
685 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
686 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
688 install-shared
: install-shared-
$(DYEXT
)
689 install-shared-so
: libpcap.so
690 [ -d
$(DESTDIR
)$(libdir) ] || \
691 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
692 VER
=`cat $(srcdir)/VERSION`; \
693 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
694 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
695 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
696 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
697 install-shared-dylib
: libpcap.dylib
698 [ -d
$(DESTDIR
)$(libdir) ] || \
699 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
700 VER
=`cat $(srcdir)/VERSION`; \
702 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
703 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
704 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
705 install-shared-sl
: libpcap.sl
706 [ -d
$(DESTDIR
)$(libdir) ] || \
707 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
708 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
709 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
710 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
711 install-shared-shareda
: libpcap.shareda
713 # AIX shared libraries are weird. They're archive libraries
714 # with one or more shared object components.
716 [ -d
$(DESTDIR
)$(libdir) ] || \
717 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
718 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
721 install-archive
: install-archive-
$(DYEXT
)
722 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
724 # Most platforms have separate suffixes for shared and
725 # archive libraries, so we install both.
727 [ -d
$(DESTDIR
)$(libdir) ] || \
728 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
729 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
730 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
731 install-archive-shareda
:
733 # AIX, however, doesn't, so we don't install the archive
738 (cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) install)
740 uninstall: uninstall-shared uninstall-rpcapd
741 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
742 for i in
$(PUBHDR
); do \
743 rm -f
$(DESTDIR
)$(includedir)/$$i; done
744 -rmdir
$(DESTDIR
)$(includedir)/pcap
745 rm -f
$(DESTDIR
)/$(libdir)/pkgconfig
/libpcap.
pc
746 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
747 for i in
$(MAN1
); do \
748 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
749 for i in
$(MAN3PCAP
); do \
750 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
751 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
752 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description_or_dlt
.3pcap
753 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
754 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
755 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
756 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
757 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
758 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
759 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
760 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
761 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
762 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_dead_with_tstamp_precision
.3pcap
763 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline_with_tstamp_precision
.3pcap
764 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
765 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline_with_tstamp_precision
.3pcap
766 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
767 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_tstamp_type_val_to_description
.3pcap
768 for i in
$(MANFILE
); do \
769 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
770 for i in
$(MANMISC
); do \
771 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
773 uninstall-shared
: uninstall-shared-
$(DYEXT
)
775 VER
=`cat $(srcdir)/VERSION`; \
776 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
777 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
778 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
779 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
780 uninstall-shared-dylib
:
781 VER
=`cat $(srcdir)/VERSION`; \
783 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
784 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
785 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
787 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
788 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
789 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
790 uninstall-shared-shareda
:
791 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
792 uninstall-shared-none
:
795 (cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) uninstall)
799 (cd rpcapd
; $(MAKE
) clean)
800 (cd testprogs
; $(MAKE
) clean)
803 rm -f Makefile grammar.y config.cache config.log config.status \
804 config.h gnuc.h net os-proto.h libpcap.
pc \
805 pcap-config stamp-h stamp-h.in
806 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
807 rm -rf autom4te.cache
808 (cd rpcapd
; $(MAKE
) distclean)
809 (cd testprogs
; $(MAKE
) distclean)
815 ctags
-wtd
$(TAGFILES
)
819 name
=$(PROG
)-`cat VERSION` && \
821 tar cf
- $(COMMON_C_SRC
) $(HDR
) $(MAN1
) \
822 $(MAN3PCAP_EXPAND
) $(MAN3PCAP_NOEXPAND
) $(MANFILE
) \
823 $(MANMISC
) $(EXTRA_DIST
) >/dev
/null
&& \
824 tar cf
- $(COMMON_C_SRC
) $(HDR
) $(MAN1
) \
825 $(MAN3PCAP_EXPAND
) $(MAN3PCAP_NOEXPAND
) $(MANFILE
) \
826 $(MANMISC
) $(EXTRA_DIST
) | \
827 (cd
$$name; tar xf
-) && \
828 tar cf
- $$name >/dev
/null
&& \
829 tar cf
- $$name | gzip
>$$name.
tar.gz
&& \
833 @VER
=`cat $(srcdir)/VERSION`; \
834 sed
-i
"s/$$VER/$${VER}$@/" VERSION
; \
836 git checkout VERSION configure
838 depend
: $(GENERATED_C_SRC
) $(GENHDR
)
839 $(MKDEP
) -c
"$(CC)" -m
"$(DEPENDENCY_CFLAG)" -s
"$(srcdir)" $(CFLAGS
) $(DEFS
) $(INCLS
) $(SRC
)
840 (cd rpcapd
; $(MAKE
) depend
)
841 (cd testprogs
; $(MAKE
) depend
)
844 shellcheck
-f gcc
-e SC2006 build.sh build_matrix.sh build_common.sh