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@
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 \
166 CLEANFILES
= $(OBJ
) libpcap.a libpcap.so.
`cat $(srcdir)/VERSION` \
167 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENERATED_C_SRC
) $(GENHDR
) \
168 lex.yy.c pcap-config libpcap.
pc
174 pcap_compile
.3pcap.in \
175 pcap_datalink
.3pcap.in \
176 pcap_dump_open
.3pcap.in \
177 pcap_get_tstamp_precision
.3pcap.in \
178 pcap_list_datalinks
.3pcap.in \
179 pcap_list_tstamp_types
.3pcap.in \
180 pcap_open_dead
.3pcap.in \
181 pcap_open_offline
.3pcap.in \
182 pcap_set_immediate_mode
.3pcap.in \
183 pcap_set_tstamp_precision
.3pcap.in \
184 pcap_set_tstamp_type
.3pcap.in
186 MAN3PCAP_NOEXPAND
= \
187 pcap_activate
.3pcap \
188 pcap_breakloop
.3pcap \
189 pcap_can_set_rfmon
.3pcap \
192 pcap_datalink_name_to_val
.3pcap \
193 pcap_datalink_val_to_name
.3pcap \
195 pcap_dump_close
.3pcap \
196 pcap_dump_file
.3pcap \
197 pcap_dump_flush
.3pcap \
198 pcap_dump_ftell
.3pcap \
201 pcap_findalldevs
.3pcap \
202 pcap_freecode
.3pcap \
203 pcap_get_required_select_timeout
.3pcap \
204 pcap_get_selectable_fd
.3pcap \
208 pcap_is_swapped
.3pcap \
209 pcap_lib_version
.3pcap \
210 pcap_lookupdev
.3pcap \
211 pcap_lookupnet
.3pcap \
213 pcap_major_version
.3pcap \
215 pcap_offline_filter
.3pcap \
216 pcap_open_live
.3pcap \
217 pcap_set_buffer_size
.3pcap \
218 pcap_set_datalink
.3pcap \
219 pcap_set_promisc
.3pcap \
220 pcap_set_protocol_linux
.3pcap \
221 pcap_set_rfmon
.3pcap \
222 pcap_set_snaplen
.3pcap \
223 pcap_set_timeout
.3pcap \
224 pcap_setdirection
.3pcap \
225 pcap_setfilter
.3pcap \
226 pcap_setnonblock
.3pcap \
227 pcap_snapshot
.3pcap \
229 pcap_statustostr
.3pcap \
230 pcap_strerror
.3pcap \
231 pcap_tstamp_type_name_to_val
.3pcap \
232 pcap_tstamp_type_val_to_name
.3pcap
234 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
237 pcap-savefile.manfile.in
240 pcap-filter.manmisc.in \
241 pcap-linktype.manmisc.in \
242 pcap-tstamp.manmisc.in
247 ChmodBPF
/StartupParameters.plist \
253 Makefile-devel-adds \
263 cmake_uninstall.cmake.in \
265 cmake
/Modules
/FindDAG.cmake \
266 cmake
/Modules
/Finddpdk.cmake \
267 cmake
/Modules
/FindFseeko.cmake \
268 cmake
/Modules
/FindLFS.cmake \
269 cmake
/Modules
/FindPacket.cmake \
270 cmake
/Modules
/FindSNF.cmake \
271 cmake
/Modules
/FindTC.cmake \
272 cmake
/have_siocglifconf.c \
300 missing
/win_asprintf.c \
312 org.tcpdump.chmod_bpf.plist \
318 pcap-bt-monitor-linux.c \
319 pcap-bt-monitor-linux.h \
338 pcap-netfilter-linux.c \
339 pcap-netfilter-linux.h \
364 rpcapd
/CMakeLists.txt \
366 rpcapd
/config_params.h \
373 rpcapd
/org.tcpdump.rpcapd.plist \
376 rpcapd
/rpcapd.inetd.conf \
377 rpcapd
/rpcapd.manadmin.in \
378 rpcapd
/rpcapd-config.manfile.in \
380 rpcapd
/rpcapd.socket \
381 rpcapd
/rpcapd.xinetd.conf \
382 rpcapd
/rpcapd@.service \
390 testprogs
/CMakeLists.txt \
391 testprogs
/Makefile.in \
392 testprogs
/can_set_rfmon_test.c \
393 testprogs
/capturetest.c \
394 testprogs
/filtertest.c \
395 testprogs
/findalldevstest.c \
396 testprogs
/fuzz
/CMakeLists.txt \
397 testprogs
/fuzz
/fuzz_both.c \
398 testprogs
/fuzz
/fuzz_both.options \
399 testprogs
/fuzz
/fuzz_filter.c \
400 testprogs
/fuzz
/fuzz_filter.options \
401 testprogs
/fuzz
/fuzz_pcap.c \
402 testprogs
/fuzz
/fuzz_pcap.options \
403 testprogs
/fuzz
/onefile.c \
404 testprogs
/opentest.c \
405 testprogs
/reactivatetest.c \
406 testprogs
/selpolltest.c \
407 testprogs
/threadsignaltest.c \
409 testprogs
/valgrindtest.c \
410 tests
/shb-option-too-long.pcapng \
411 Win32
/Prj
/wpcap.sln \
412 Win32
/Prj
/wpcap.vcxproj \
413 Win32
/Prj
/wpcap.vcxproj.filters
415 all: libpcap.a shared
$(BUILD_RPCAPD
) libpcap.
pc pcap-config
419 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
422 shared
: libpcap.
$(DYEXT
)
426 VER
=`cat $(srcdir)/VERSION`; \
427 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
428 @V_SHLIB_CMD@
$(LDFLAGS
) @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER \
429 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
432 # The following rule succeeds, but the result is untested.
434 # In macOS, the libpcap dylib has the name "libpcap.A.dylib", with its
435 # full path as the install_name, and with the compatibility and current
436 # version both set to 1. The compatibility version is set to 1 so that
437 # programs built with a newer version of the library will run against
438 # older versions if they don't use APIs available in the newer version
439 # but not in the older version.
441 # We also use "A" as the major version, and 1 as the compatibility version,
442 # but set the current version to the value in VERSION, with any non-numeric
443 # stuff stripped off (the compatibility and current version must be of the
444 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
447 libpcap.dylib
: $(OBJ
)
449 VER
=`cat $(srcdir)/VERSION`; \
452 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
453 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) @V_LIB_LDFLAGS_FAT@ \
454 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
455 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
456 -compatibility_version
$$COMPAT_VER \
457 -current_version
$$CURRENT_VER
460 # The HP-UX linker manual says that the convention for a versioned library
461 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
462 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
465 # The manual also says "library-level versioning" (think "sonames") was
466 # added in HP-UX 10.0.
468 # XXX - this assumes we're using the HP linker, rather than the GNU
469 # linker, even with GCC.
472 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
473 rm -f libpcap.
$$MAJOR_VER
474 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
475 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
476 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
479 # AIX is different from everybody else. A shared library is an archive
480 # library with one or more shared-object components. We still build a
481 # normal static archive library on AIX, for the benefit of the traditional
482 # scheme of building libpcap and tcpdump in subdirectories of the
483 # same directory, with tcpdump statically linked with the libpcap
484 # in question, but we also build a shared library as "libpcap.shareda"
485 # and install *it*, rather than the static library, as "libpcap.a".
487 libpcap.shareda
: $(OBJ
)
489 $(CC
) $(LDFLAGS
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LIBS
)
493 # For platforms that don't support shared libraries (or on which we
494 # don't support shared libraries).
498 scanner.c
: $(srcdir)/scanner.l
499 $(LEX
) -P pcap_
--header-file
=scanner.h
--nounput
-o scanner.c
$<
501 ## Recover from the removal of $@
502 @if
test -f
$@
; then
:; else \
504 $(MAKE
) $(MAKEFLAGS
) scanner.c
; \
507 scanner.o
: scanner.c grammar.h
508 $(CC
) $(FULL_CFLAGS
) -c scanner.c
510 grammar.c
: $(srcdir)/grammar.y
511 $(YACC
) -p pcap_
-o grammar.c
-d
$<
513 ## Recover from the removal of $@
514 @if
test -f
$@
; then
:; else \
516 $(MAKE
) $(MAKEFLAGS
) grammar.c
; \
519 grammar.o
: grammar.c scanner.h
520 $(CC
) $(FULL_CFLAGS
) -c grammar.c
522 gencode.o
: $(srcdir)/gencode.c grammar.h scanner.h
523 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/gencode.c
525 asprintf.o
: $(srcdir)/missing
/asprintf.c
526 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/asprintf.c
528 snprintf.o
: $(srcdir)/missing
/snprintf.c
529 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
531 strlcat.o
: $(srcdir)/missing
/strlcat.c
532 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcat.c
534 strlcpy.o
: $(srcdir)/missing
/strlcpy.c
535 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strlcpy.c
537 strtok_r.o
: $(srcdir)/missing
/strtok_r.c
538 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strtok_r.c
541 # Generate the libpcap.pc file.
543 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
544 # for example, the Solaris 9 make man page says
546 # Because make assigns $< and $* as it would for implicit rules
547 # (according to the suffixes list and the directory contents),
548 # they may be unreliable when used within explicit target entries.
550 # and this is an explicit target entry.
552 # Therefore, instead of using $<, we explicitly put in $(srcdir)/libpcap.pc.in.
554 libpcap.
pc: $(srcdir)/libpcap.
pc.in .
/config.status
556 .
/config.status
--file
=$@.tmp
:$(srcdir)/libpcap.
pc.in
560 # Generate the pcap-config script. See above.
562 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
564 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
569 # Remote pcap daemon.
571 build-rpcapd
: libpcap.a
575 # Test programs - not built by default, and not installed.
578 cd testprogs
; $(MAKE
)
582 install: install-shared install-archive libpcap.
pc pcap-config @INSTALL_RPCAPD@
583 [ -d
$(DESTDIR
)$(libdir) ] || \
584 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
585 [ -d
$(DESTDIR
)$(includedir) ] || \
586 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
587 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
588 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
589 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
590 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
591 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
592 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
593 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
594 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
595 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
596 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
597 for i in
$(PUBHDR
); do \
598 $(INSTALL_DATA
) $(srcdir)/$$i \
599 $(DESTDIR
)$(includedir)/$$i; done
600 [ -d
$(DESTDIR
)$(bindir) ] || \
601 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
602 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
603 [ -d
$(DESTDIR
)$(libdir)/pkgconfig
] || \
604 (mkdir
-p
$(DESTDIR
)$(libdir)/pkgconfig
; chmod
755 $(DESTDIR
)$(libdir)/pkgconfig
)
605 $(INSTALL_DATA
) libpcap.
pc $(DESTDIR
)$(libdir)/pkgconfig
/libpcap.
pc
606 for i in
$(MAN1
); do \
607 $(INSTALL_DATA
) $(srcdir)/$$i \
608 $(DESTDIR
)$(mandir)/man1
/$$i; done
609 for i in
$(MAN3PCAP_NOEXPAND
); do \
610 $(INSTALL_DATA
) $(srcdir)/$$i \
611 $(DESTDIR
)$(mandir)/man3
/$$i; done
612 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
613 $(INSTALL_DATA
) $$i \
614 $(DESTDIR
)$(mandir)/man3
/$$i; done
615 (cd
$(DESTDIR
)$(mandir)/man3
&& \
616 rm -f pcap_datalink_val_to_description
.3pcap
&& \
617 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
618 pcap_datalink_val_to_description
.3pcap
&& \
619 rm -f pcap_datalink_val_to_description_or_dlt
.3pcap
&& \
620 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
621 pcap_datalink_val_to_description_or_dlt
.3pcap
&& \
622 rm -f pcap_dump_fopen
.3pcap
&& \
623 $(LN_S
) pcap_dump_open
.3pcap pcap_dump_fopen
.3pcap
&& \
624 rm -f pcap_freealldevs
.3pcap
&& \
625 $(LN_S
) pcap_findalldevs
.3pcap pcap_freealldevs
.3pcap
&& \
626 rm -f pcap_perror
.3pcap
&& \
627 $(LN_S
) pcap_geterr
.3pcap pcap_perror
.3pcap
&& \
628 rm -f pcap_sendpacket
.3pcap
&& \
629 $(LN_S
) pcap_inject
.3pcap pcap_sendpacket
.3pcap
&& \
630 rm -f pcap_free_datalinks
.3pcap
&& \
631 $(LN_S
) pcap_list_datalinks
.3pcap pcap_free_datalinks
.3pcap
&& \
632 rm -f pcap_free_tstamp_types
.3pcap
&& \
633 $(LN_S
) pcap_list_tstamp_types
.3pcap pcap_free_tstamp_types
.3pcap
&& \
634 rm -f pcap_dispatch
.3pcap
&& \
635 $(LN_S
) pcap_loop
.3pcap pcap_dispatch
.3pcap
&& \
636 rm -f pcap_minor_version
.3pcap
&& \
637 $(LN_S
) pcap_major_version
.3pcap pcap_minor_version
.3pcap
&& \
638 rm -f pcap_next
.3pcap
&& \
639 $(LN_S
) pcap_next_ex
.3pcap pcap_next
.3pcap
&& \
640 rm -f pcap_open_dead_with_tstamp_precision
.3pcap
&& \
641 $(LN_S
) pcap_open_dead
.3pcap \
642 pcap_open_dead_with_tstamp_precision
.3pcap
&& \
643 rm -f pcap_open_offline_with_tstamp_precision
.3pcap
&& \
644 $(LN_S
) pcap_open_offline
.3pcap pcap_open_offline_with_tstamp_precision
.3pcap
&& \
645 rm -f pcap_fopen_offline
.3pcap
&& \
646 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline
.3pcap
&& \
647 rm -f pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
648 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
649 rm -f pcap_tstamp_type_val_to_description
.3pcap
&& \
650 $(LN_S
) pcap_tstamp_type_val_to_name
.3pcap pcap_tstamp_type_val_to_description
.3pcap
&& \
651 rm -f pcap_getnonblock
.3pcap
&& \
652 $(LN_S
) pcap_setnonblock
.3pcap pcap_getnonblock
.3pcap
)
653 for i in
$(MANFILE
); do \
654 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
655 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
656 for i in
$(MANMISC
); do \
657 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
658 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
660 install-shared
: install-shared-
$(DYEXT
)
661 install-shared-so
: libpcap.so
662 [ -d
$(DESTDIR
)$(libdir) ] || \
663 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
664 VER
=`cat $(srcdir)/VERSION`; \
665 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
666 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
667 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
668 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
669 install-shared-dylib
: libpcap.dylib
670 [ -d
$(DESTDIR
)$(libdir) ] || \
671 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
672 VER
=`cat $(srcdir)/VERSION`; \
674 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
675 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
676 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
677 install-shared-sl
: libpcap.sl
678 [ -d
$(DESTDIR
)$(libdir) ] || \
679 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
680 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
681 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
682 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
683 install-shared-shareda
: libpcap.shareda
685 # AIX shared libraries are weird. They're archive libraries
686 # with one or more shared object components.
688 [ -d
$(DESTDIR
)$(libdir) ] || \
689 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
690 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
693 install-archive
: install-archive-
$(DYEXT
)
694 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
696 # Most platforms have separate suffixes for shared and
697 # archive libraries, so we install both.
699 [ -d
$(DESTDIR
)$(libdir) ] || \
700 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
701 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
702 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
703 install-archive-shareda
:
705 # AIX, however, doesn't, so we don't install the archive
710 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) install
712 uninstall: uninstall-shared uninstall-rpcapd
713 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
714 for i in
$(PUBHDR
); do \
715 rm -f
$(DESTDIR
)$(includedir)/$$i; done
716 -rmdir
$(DESTDIR
)$(includedir)/pcap
717 rm -f
$(DESTDIR
)/$(libdir)/pkgconfig
/libpcap.
pc
718 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
719 for i in
$(MAN1
); do \
720 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
721 for i in
$(MAN3PCAP
); do \
722 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
723 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
724 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
725 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
726 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
727 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
728 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
729 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
730 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
731 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
732 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
733 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_dead_with_tstamp_precision
.3pcap
734 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline_with_tstamp_precision
.3pcap
735 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
736 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline_with_tstamp_precision
.3pcap
737 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
738 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_tstamp_type_val_to_description
.3pcap
739 for i in
$(MANFILE
); do \
740 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
741 for i in
$(MANMISC
); do \
742 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
744 uninstall-shared
: uninstall-shared-
$(DYEXT
)
746 VER
=`cat $(srcdir)/VERSION`; \
747 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
748 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
749 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
750 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
751 uninstall-shared-dylib
:
752 VER
=`cat $(srcdir)/VERSION`; \
754 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
755 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
756 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
758 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
759 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
760 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
761 uninstall-shared-shareda
:
762 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
763 uninstall-shared-none
:
766 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) uninstall
770 cd rpcapd
; $(MAKE
) clean
771 cd testprogs
; $(MAKE
) clean
774 rm -f Makefile config.cache config.log config.status \
775 config.h gnuc.h net os-proto.h libpcap.
pc \
776 pcap-config stamp-h stamp-h.in
777 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
778 rm -rf autom4te.cache
779 cd rpcapd
; $(MAKE
) distclean
780 cd testprogs
; $(MAKE
) distclean
786 ctags
-wtd
$(TAGFILES
)
790 name
=$(PROG
)-`cat VERSION` ; \
792 tar -c
--exclude
='*~' -f
- $(COMMON_C_SRC
) $(HDR
) $(MAN1
) \
793 $(MAN3PCAP_EXPAND
) $(MAN3PCAP_NOEXPAND
) $(MANFILE
) \
794 $(MANMISC
) $(EXTRA_DIST
) | \
795 (cd
$$name; tar xf
-); \
796 tar -c
-z
-f
$$name.
tar.gz
$$name; \
800 @VER
=`cat $(srcdir)/VERSION`; \
801 sed
-i
"s/$$VER/$${VER}$@/" VERSION
; \
805 depend
: $(GENERATED_C_SRC
) $(GENHDR
)
806 $(MKDEP
) -c
"$(CC)" -m
"$(DEPENDENCY_CFLAG)" -s
"$(srcdir)" $(CFLAGS
) $(DEFS
) $(INCLS
) $(SRC
)
807 cd rpcapd
; $(MAKE
) depend
808 cd testprogs
; $(MAKE
) depend