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}
65 DEPENDENCY_CFLAG
= @DEPENDENCY_CFLAG@
67 PTHREAD_LIBS
=@PTHREAD_LIBS@
68 BUILD_RPCAPD
=@BUILD_RPCAPD@
69 INSTALL_RPCAPD
=@INSTALL_RPCAPD@
71 # Standard CFLAGS for building members of a shared library
72 FULL_CFLAGS
= $(CCOPT
) @V_LIB_CCOPT_FAT@
$(SHLIB_CCOPT
) $(INCLS
) $(DEFS
) $(CFLAGS
)
73 CXXFLAGS
= $(CCOPT
) @V_LIB_CCOPT_FAT@
$(SHLIB_CCOPT
) $(INCLS
) $(DEFS
) $(CFLAGS
)
76 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
77 INSTALL_DATA
= @INSTALL_DATA@
81 BISON_BYACC
= @BISON_BYACC@
83 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
84 # Also, gcc does not remove the .o before forking 'as', which can be a
85 # problem if you don't own the file but can write to the directory.
88 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/$*.c
90 PLATFORM_C_SRC
= @PLATFORM_C_SRC@
91 PLATFORM_CXX_SRC
= @PLATFORM_CXX_SRC@
92 MODULE_C_SRC
= @MODULE_C_SRC@
93 REMOTE_C_SRC
= @REMOTE_C_SRC@
94 COMMON_C_SRC
= pcap.c gencode.c optimize.c nametoaddr.c etherent.c \
95 fmtutils.c pcap-util.c \
96 savefile.c sf-pcap.c sf-pcapng.c pcap-common.c \
97 pcap-usb-linux-common.c bpf_image.c bpf_filter.c bpf_dump.c
98 GENERATED_C_SRC
= scanner.c grammar.c
101 SRC
= $(PLATFORM_C_SRC
) $(PLATFORM_CXX_SRC
) \
102 $(MODULE_C_SRC
) $(REMOTE_C_SRC
) $(COMMON_C_SRC
) \
105 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
106 # hack the extra indirection, and we have to handle PLATFORM_CXX_SRC
107 # differently from the defines for C source
108 OBJ
= $(PLATFORM_C_SRC
:.c
=.o
) $(PLATFORM_CXX_SRC
:.
cpp=.o
) \
109 $(MODULE_C_SRC
:.c
=.o
) $(REMOTE_C_SRC
:.c
=.o
) $(COMMON_C_SRC
:.c
=.o
) \
110 $(GENERATED_C_SRC
:.c
=.o
) \
119 pcap
/can_socketcan.h \
120 pcap
/compiler-tests.h \
126 pcap
/pcap-inttypes.h \
151 pcap-usb-linux-common.h \
168 CLEANFILES
= $(OBJ
) libpcap.a libpcap.so.
`cat $(srcdir)/VERSION` \
169 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENERATED_C_SRC
) $(GENHDR
) \
170 lex.yy.c pcap-config libpcap.
pc
176 pcap_compile
.3pcap.in \
177 pcap_datalink
.3pcap.in \
178 pcap_dump_open
.3pcap.in \
179 pcap_get_tstamp_precision
.3pcap.in \
180 pcap_list_datalinks
.3pcap.in \
181 pcap_list_tstamp_types
.3pcap.in \
182 pcap_open_dead
.3pcap.in \
183 pcap_open_offline
.3pcap.in \
184 pcap_set_immediate_mode
.3pcap.in \
185 pcap_set_tstamp_precision
.3pcap.in \
186 pcap_set_tstamp_type
.3pcap.in
188 MAN3PCAP_NOEXPAND
= \
189 pcap_activate
.3pcap \
190 pcap_breakloop
.3pcap \
191 pcap_can_set_rfmon
.3pcap \
194 pcap_datalink_name_to_val
.3pcap \
195 pcap_datalink_val_to_name
.3pcap \
197 pcap_dump_close
.3pcap \
198 pcap_dump_file
.3pcap \
199 pcap_dump_flush
.3pcap \
200 pcap_dump_ftell
.3pcap \
203 pcap_findalldevs
.3pcap \
204 pcap_freecode
.3pcap \
205 pcap_get_required_select_timeout
.3pcap \
206 pcap_get_selectable_fd
.3pcap \
210 pcap_is_swapped
.3pcap \
211 pcap_lib_version
.3pcap \
212 pcap_lookupdev
.3pcap \
213 pcap_lookupnet
.3pcap \
215 pcap_major_version
.3pcap \
217 pcap_offline_filter
.3pcap \
218 pcap_open_live
.3pcap \
219 pcap_set_buffer_size
.3pcap \
220 pcap_set_datalink
.3pcap \
221 pcap_set_promisc
.3pcap \
222 pcap_set_protocol_linux
.3pcap \
223 pcap_set_rfmon
.3pcap \
224 pcap_set_snaplen
.3pcap \
225 pcap_set_timeout
.3pcap \
226 pcap_setdirection
.3pcap \
227 pcap_setfilter
.3pcap \
228 pcap_setnonblock
.3pcap \
229 pcap_snapshot
.3pcap \
231 pcap_statustostr
.3pcap \
232 pcap_strerror
.3pcap \
233 pcap_tstamp_type_name_to_val
.3pcap \
234 pcap_tstamp_type_val_to_name
.3pcap
236 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
239 pcap-savefile.manfile.in
242 pcap-filter.manmisc.in \
243 pcap-linktype.manmisc.in \
244 pcap-tstamp.manmisc.in
249 ChmodBPF
/StartupParameters.plist \
255 Makefile-devel-adds \
257 doc
/README.Win32.md \
265 doc
/README.solaris.md \
273 cmake_uninstall.cmake.in \
275 cmake
/Modules
/FindAirPcap.cmake \
276 cmake
/Modules
/FindDAG.cmake \
277 cmake
/Modules
/Finddpdk.cmake \
278 cmake
/Modules
/FindFseeko.cmake \
279 cmake
/Modules
/FindLFS.cmake \
280 cmake
/Modules
/FindPacket.cmake \
281 cmake
/Modules
/FindSNF.cmake \
282 cmake
/Modules
/FindTC.cmake \
283 cmake
/have_siocglifconf.c \
311 missing
/win_asprintf.c \
323 org.tcpdump.chmod_bpf.plist \
329 pcap-bt-monitor-linux.c \
330 pcap-bt-monitor-linux.h \
349 pcap-netfilter-linux.c \
350 pcap-netfilter-linux.h \
375 rpcapd
/CMakeLists.txt \
377 rpcapd
/config_params.h \
384 rpcapd
/org.tcpdump.rpcapd.plist \
387 rpcapd
/rpcapd.inetd.conf \
388 rpcapd
/rpcapd.manadmin.in \
389 rpcapd
/rpcapd-config.manfile.in \
391 rpcapd
/rpcapd.socket \
392 rpcapd
/rpcapd.xinetd.conf \
393 rpcapd
/rpcapd@.service \
401 testprogs
/CMakeLists.txt \
402 testprogs
/Makefile.in \
403 testprogs
/can_set_rfmon_test.c \
404 testprogs
/capturetest.c \
405 testprogs
/filtertest.c \
406 testprogs
/findalldevstest.c \
407 testprogs
/findalldevstest-perf.c \
408 testprogs
/fuzz
/CMakeLists.txt \
409 testprogs
/fuzz
/fuzz_both.c \
410 testprogs
/fuzz
/fuzz_both.options \
411 testprogs
/fuzz
/fuzz_filter.c \
412 testprogs
/fuzz
/fuzz_filter.options \
413 testprogs
/fuzz
/fuzz_pcap.c \
414 testprogs
/fuzz
/fuzz_pcap.options \
415 testprogs
/fuzz
/onefile.c \
416 testprogs
/nonblocktest.c \
417 testprogs
/opentest.c \
418 testprogs
/reactivatetest.c \
419 testprogs
/selpolltest.c \
420 testprogs
/threadsignaltest.c \
422 testprogs
/valgrindtest.c \
423 testprogs
/visopts.py \
424 testprogs
/writecaptest.c
426 TEST_DIST
= `git ls-files tests | grep -v 'tests/\..*'`
428 RELEASE_FILES
= $(COMMON_C_SRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
429 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) \
432 all: libpcap.a shared
$(BUILD_RPCAPD
) libpcap.
pc pcap-config
436 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
439 shared
: libpcap.
$(DYEXT
)
443 VER
=`cat $(srcdir)/VERSION`; \
444 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
445 @V_SHLIB_CMD@
$(LDFLAGS
) @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER \
446 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
449 # The following rule succeeds, but the result is untested.
451 # In macOS, the libpcap dylib has the name "libpcap.A.dylib", with its
452 # full path as the install_name, and with the compatibility and current
453 # version both set to 1. The compatibility version is set to 1 so that
454 # programs built with a newer version of the library will run against
455 # older versions if they don't use APIs available in the newer version
456 # but not in the older version.
458 # We also use "A" as the major version, and 1 as the compatibility version,
459 # but set the current version to the value in VERSION, with any non-numeric
460 # stuff stripped off (the compatibility and current version must be of the
461 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
464 libpcap.dylib
: $(OBJ
)
466 VER
=`cat $(srcdir)/VERSION`; \
469 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
470 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) @V_LIB_LDFLAGS_FAT@ \
471 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
472 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
473 -compatibility_version
$$COMPAT_VER \
474 -current_version
$$CURRENT_VER
477 # The HP-UX linker manual says that the convention for a versioned library
478 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
479 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
482 # The manual also says "library-level versioning" (think "sonames") was
483 # added in HP-UX 10.0.
485 # XXX - this assumes we're using the HP linker, rather than the GNU
486 # linker, even with GCC.
489 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
490 rm -f libpcap.
$$MAJOR_VER
491 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
492 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
493 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
496 # AIX is different from everybody else. A shared library is an archive
497 # library with one or more shared-object components. We still build a
498 # normal static archive library on AIX, for the benefit of the traditional
499 # scheme of building libpcap and tcpdump in subdirectories of the
500 # same directory, with tcpdump statically linked with the libpcap
501 # in question, but we also build a shared library as "libpcap.shareda"
502 # and install *it*, rather than the static library, as "libpcap.a".
504 libpcap.shareda
: $(OBJ
)
506 $(CC
) $(LDFLAGS
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LIBS
)
510 # For platforms that don't support shared libraries (or on which we
511 # don't support shared libraries).
515 scanner.c
: $(srcdir)/scanner.l
516 $(LEX
) -P pcap_
--header-file
=scanner.h
--nounput
-o scanner.c
$<
518 ## Recover from the removal of $@
519 @if
test -f
$@
; then
:; else \
521 $(MAKE
) $(MAKEFLAGS
) scanner.c
; \
524 scanner.o
: scanner.c grammar.h
525 $(CC
) $(FULL_CFLAGS
) -c scanner.c
528 # Generate the grammar.y file.
530 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
531 # for example, the Solaris 9 make man page says
533 # Because make assigns $< and $* as it would for implicit rules
534 # (according to the suffixes list and the directory contents),
535 # they may be unreliable when used within explicit target entries.
537 # and this is an explicit target entry.
539 # Therefore, instead of using $<, we explicitly put in $(srcdir)/libpcap.pc.in.
541 grammar.y
: $(srcdir)/grammar.y.in .
/config.status
543 .
/config.status
--file
=$@.tmp
:$(srcdir)/grammar.y.in
547 $(BISON_BYACC
) -p pcap_
-o grammar.c
-d
$<
549 ## Recover from the removal of $@
550 @if
test -f
$@
; then
:; else \
552 $(MAKE
) $(MAKEFLAGS
) grammar.c
; \
555 grammar.o
: grammar.c scanner.h
556 $(CC
) $(FULL_CFLAGS
) -c grammar.c
558 gencode.o
: $(srcdir)/gencode.c grammar.h scanner.h
559 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/gencode.c
561 asprintf.o
: $(srcdir)/missing
/asprintf.c
562 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/asprintf.c
564 snprintf.o
: $(srcdir)/missing
/snprintf.c
565 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
567 strlcat.o
: $(srcdir)/missing
/strlcat.c
568 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcat.c
570 strlcpy.o
: $(srcdir)/missing
/strlcpy.c
571 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcpy.c
573 strtok_r.o
: $(srcdir)/missing
/strtok_r.c
574 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strtok_r.c
577 # Generate the libpcap.pc file.
579 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
580 # for example, the Solaris 9 make man page says
582 # Because make assigns $< and $* as it would for implicit rules
583 # (according to the suffixes list and the directory contents),
584 # they may be unreliable when used within explicit target entries.
586 # and this is an explicit target entry.
588 # Therefore, instead of using $<, we explicitly put in $(srcdir)/libpcap.pc.in.
590 libpcap.
pc: $(srcdir)/libpcap.
pc.in .
/config.status
592 .
/config.status
--file
=$@.tmp
:$(srcdir)/libpcap.
pc.in
596 # Generate the pcap-config script. See above.
598 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
600 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
605 # Remote pcap daemon.
607 build-rpcapd
: libpcap.a
611 # Test programs - not built by default, and not installed.
614 (cd testprogs
; $(MAKE
))
618 install: install-shared install-archive libpcap.
pc pcap-config @INSTALL_RPCAPD@
619 [ -d
$(DESTDIR
)$(libdir) ] || \
620 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
621 [ -d
$(DESTDIR
)$(includedir) ] || \
622 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
623 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
624 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
625 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
626 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
627 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
628 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
629 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
630 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
631 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
632 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
633 for i in
$(PUBHDR
); do \
634 $(INSTALL_DATA
) $(srcdir)/$$i \
635 $(DESTDIR
)$(includedir)/$$i; done
636 [ -d
$(DESTDIR
)$(bindir) ] || \
637 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
638 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
639 [ -d
$(DESTDIR
)$(libdir)/pkgconfig
] || \
640 (mkdir
-p
$(DESTDIR
)$(libdir)/pkgconfig
; chmod
755 $(DESTDIR
)$(libdir)/pkgconfig
)
641 $(INSTALL_DATA
) libpcap.
pc $(DESTDIR
)$(libdir)/pkgconfig
/libpcap.
pc
642 for i in
$(MAN1
); do \
643 $(INSTALL_DATA
) $(srcdir)/$$i \
644 $(DESTDIR
)$(mandir)/man1
/$$i; done
645 for i in
$(MAN3PCAP_NOEXPAND
); do \
646 $(INSTALL_DATA
) $(srcdir)/$$i \
647 $(DESTDIR
)$(mandir)/man3
/$$i; done
648 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
649 $(INSTALL_DATA
) $$i \
650 $(DESTDIR
)$(mandir)/man3
/$$i; done
651 (cd
$(DESTDIR
)$(mandir)/man3
&& \
652 rm -f pcap_datalink_val_to_description
.3pcap
&& \
653 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
654 pcap_datalink_val_to_description
.3pcap
&& \
655 rm -f pcap_datalink_val_to_description_or_dlt
.3pcap
&& \
656 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
657 pcap_datalink_val_to_description_or_dlt
.3pcap
&& \
658 rm -f pcap_dump_fopen
.3pcap
&& \
659 $(LN_S
) pcap_dump_open
.3pcap pcap_dump_fopen
.3pcap
&& \
660 rm -f pcap_freealldevs
.3pcap
&& \
661 $(LN_S
) pcap_findalldevs
.3pcap pcap_freealldevs
.3pcap
&& \
662 rm -f pcap_perror
.3pcap
&& \
663 $(LN_S
) pcap_geterr
.3pcap pcap_perror
.3pcap
&& \
664 rm -f pcap_sendpacket
.3pcap
&& \
665 $(LN_S
) pcap_inject
.3pcap pcap_sendpacket
.3pcap
&& \
666 rm -f pcap_free_datalinks
.3pcap
&& \
667 $(LN_S
) pcap_list_datalinks
.3pcap pcap_free_datalinks
.3pcap
&& \
668 rm -f pcap_free_tstamp_types
.3pcap
&& \
669 $(LN_S
) pcap_list_tstamp_types
.3pcap pcap_free_tstamp_types
.3pcap
&& \
670 rm -f pcap_dispatch
.3pcap
&& \
671 $(LN_S
) pcap_loop
.3pcap pcap_dispatch
.3pcap
&& \
672 rm -f pcap_minor_version
.3pcap
&& \
673 $(LN_S
) pcap_major_version
.3pcap pcap_minor_version
.3pcap
&& \
674 rm -f pcap_next
.3pcap
&& \
675 $(LN_S
) pcap_next_ex
.3pcap pcap_next
.3pcap
&& \
676 rm -f pcap_open_dead_with_tstamp_precision
.3pcap
&& \
677 $(LN_S
) pcap_open_dead
.3pcap \
678 pcap_open_dead_with_tstamp_precision
.3pcap
&& \
679 rm -f pcap_open_offline_with_tstamp_precision
.3pcap
&& \
680 $(LN_S
) pcap_open_offline
.3pcap pcap_open_offline_with_tstamp_precision
.3pcap
&& \
681 rm -f pcap_fopen_offline
.3pcap
&& \
682 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline
.3pcap
&& \
683 rm -f pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
684 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
685 rm -f pcap_tstamp_type_val_to_description
.3pcap
&& \
686 $(LN_S
) pcap_tstamp_type_val_to_name
.3pcap pcap_tstamp_type_val_to_description
.3pcap
&& \
687 rm -f pcap_getnonblock
.3pcap
&& \
688 $(LN_S
) pcap_setnonblock
.3pcap pcap_getnonblock
.3pcap
)
689 for i in
$(MANFILE
); do \
690 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
691 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
692 for i in
$(MANMISC
); do \
693 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
694 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
696 install-shared
: install-shared-
$(DYEXT
)
697 install-shared-so
: libpcap.so
698 [ -d
$(DESTDIR
)$(libdir) ] || \
699 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
700 VER
=`cat $(srcdir)/VERSION`; \
701 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
702 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
703 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
704 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
705 install-shared-dylib
: libpcap.dylib
706 [ -d
$(DESTDIR
)$(libdir) ] || \
707 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
708 VER
=`cat $(srcdir)/VERSION`; \
710 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
711 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
712 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
713 install-shared-sl
: libpcap.sl
714 [ -d
$(DESTDIR
)$(libdir) ] || \
715 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
716 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
717 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
718 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
719 install-shared-shareda
: libpcap.shareda
721 # AIX shared libraries are weird. They're archive libraries
722 # with one or more shared object components.
724 [ -d
$(DESTDIR
)$(libdir) ] || \
725 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
726 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
729 install-archive
: install-archive-
$(DYEXT
)
730 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
732 # Most platforms have separate suffixes for shared and
733 # archive libraries, so we install both.
735 [ -d
$(DESTDIR
)$(libdir) ] || \
736 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
737 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
738 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
739 install-archive-shareda
:
741 # AIX, however, doesn't, so we don't install the archive
746 (cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) install)
748 uninstall: uninstall-shared uninstall-rpcapd
749 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
750 for i in
$(PUBHDR
); do \
751 rm -f
$(DESTDIR
)$(includedir)/$$i; done
752 -rmdir
$(DESTDIR
)$(includedir)/pcap
753 rm -f
$(DESTDIR
)/$(libdir)/pkgconfig
/libpcap.
pc
754 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
755 for i in
$(MAN1
); do \
756 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
757 for i in
$(MAN3PCAP
); do \
758 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
759 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
760 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description_or_dlt
.3pcap
761 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
762 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
763 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
764 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
765 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
766 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
767 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
768 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
769 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
770 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_dead_with_tstamp_precision
.3pcap
771 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline_with_tstamp_precision
.3pcap
772 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
773 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline_with_tstamp_precision
.3pcap
774 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
775 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_tstamp_type_val_to_description
.3pcap
776 for i in
$(MANFILE
); do \
777 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
778 for i in
$(MANMISC
); do \
779 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
781 uninstall-shared
: uninstall-shared-
$(DYEXT
)
783 VER
=`cat $(srcdir)/VERSION`; \
784 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
785 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
786 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
787 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
788 uninstall-shared-dylib
:
789 VER
=`cat $(srcdir)/VERSION`; \
791 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
792 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
793 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
795 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
796 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
797 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
798 uninstall-shared-shareda
:
799 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
800 uninstall-shared-none
:
803 (cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) uninstall)
807 (cd rpcapd
; $(MAKE
) clean)
808 (cd testprogs
; $(MAKE
) clean)
811 rm -f Makefile grammar.y config.cache config.log config.status \
812 config.h config.h.in~ configure~ configure.ac~ \
813 net os-proto.h libpcap.
pc pcap-config stamp-h stamp-h.in
814 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
815 rm -rf autom4te.cache
816 (cd rpcapd
; $(MAKE
) distclean)
817 (cd testprogs
; $(MAKE
) distclean)
823 ctags
-wtd
$(TAGFILES
)
826 @TAG
=$(PROG
)-`cat VERSION` && \
827 if git show-ref
--tags --quiet
--verify
-- "refs/tags/$$TAG"; then \
828 git archive
--prefix="$$TAG"/ -o
"$$TAG".
tar.gz
"$$TAG" \
829 $(RELEASE_FILES
) && \
830 echo
"Archive build from tag $$TAG."; \
832 git archive
--prefix="$$TAG"/ -o
"$$TAG".
tar.gz HEAD \
833 $(RELEASE_FILES
) && \
834 echo
"No $$TAG tag. Archive build from HEAD."; \
837 depend
: $(GENERATED_C_SRC
) $(GENHDR
)
838 $(MKDEP
) -c
"$(CC)" -m
"$(DEPENDENCY_CFLAG)" -s
"$(srcdir)" $(CFLAGS
) $(DEFS
) $(INCLS
) $(SRC
)
839 (cd rpcapd
; $(MAKE
) depend
)
840 (cd testprogs
; $(MAKE
) depend
)
843 shellcheck
-f gcc
-e SC2006 build.sh build_matrix.sh build_common.sh