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@ @NETMAP_SRC@ @RDMA_SRC@
87 FSRC
= @V_FINDALLDEVS@
89 CSRC
= pcap.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 \
109 pcap
/pcap-inttypes.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_protocol
.3pcap \
229 pcap_set_rfmon
.3pcap \
230 pcap_set_snaplen
.3pcap \
231 pcap_set_timeout
.3pcap \
232 pcap_setdirection
.3pcap \
233 pcap_setfilter
.3pcap \
234 pcap_setnonblock
.3pcap \
235 pcap_snapshot
.3pcap \
237 pcap_statustostr
.3pcap \
238 pcap_strerror
.3pcap \
239 pcap_tstamp_type_name_to_val
.3pcap \
240 pcap_tstamp_type_val_to_name
.3pcap
242 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
245 pcap-savefile.manfile.in
248 pcap-filter.manmisc.in \
249 pcap-linktype.manmisc.in \
250 pcap-tstamp.manmisc.in
256 ChmodBPF
/StartupParameters.plist \
263 Makefile-devel-adds \
275 SUNOS4
/nit_if.o.sparc \
276 SUNOS4
/nit_if.o.sun3 \
277 SUNOS4
/nit_if.o.sun4c
.4.0.3c \
281 bpf
/net
/bpf_filter.c \
284 cmake
/FindLFS.cmake \
285 cmake
/FindPacket.cmake \
286 cmake
/have_siocglifconf.c \
312 missing
/win_snprintf.c \
327 org.tcpdump.chmod_bpf.plist \
331 pcap-bt-monitor-linux.c \
332 pcap-bt-monitor-linux.h \
347 pcap-netfilter-linux.c \
348 pcap-netfilter-linux.h \
376 tests
/CMakeLists.txt \
378 Win32
/Include
/Gnuc.h \
379 Win32
/Include
/net
/if.h \
380 Win32
/Prj
/wpcap.sln \
381 Win32
/Prj
/wpcap.vcxproj \
382 Win32
/Prj
/wpcap.vcxproj.filters
384 all: libpcap.a shared
$(RPCAPD
) pcap-config
388 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
391 shared
: libpcap.
$(DYEXT
)
395 VER
=`cat $(srcdir)/VERSION`; \
396 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
397 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER $(LDFLAGS
) \
398 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
401 # The following rule succeeds, but the result is untested.
403 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
404 # its full path as the install_name, and with the compatibility and
405 # current version both set to 1. The compatibility version is set to
406 # 1 so that programs built with a newer version of the library will run
407 # against older versions; multi-platform software probably will fail if
408 # it uses APIs added in the newer version, but Mac OS X-specific software
409 # will use weak linking and check at run time whether those APIs are
412 # We also use "A" as the major version, and 1 as the compatibility version,
413 # but set the current version to the value in VERSION, with any non-numeric
414 # stuff stripped off (the compatibility and current version must be of the
415 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
418 libpcap.dylib
: $(OBJ
)
420 VER
=`cat $(srcdir)/VERSION`; \
423 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
424 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) \
425 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
426 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
427 -compatibility_version
$$COMPAT_VER \
428 -current_version
$$CURRENT_VER
431 # The HP-UX linker manual says that the convention for a versioned library
432 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
433 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
436 # The manual also says "library-level versioning" (think "sonames") was
437 # added in HP-UX 10.0.
439 # XXX - this assumes we're using the HP linker, rather than the GNU
440 # linker, even with GCC.
443 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
444 rm -f libpcap.
$$MAJOR_VER
445 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
446 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
447 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
450 # AIX is different from everybody else. A shared library is an archive
451 # library with one or more shared-object components. We still build a
452 # normal static archive library on AIX, for the benefit of the traditional
453 # scheme of building libpcap and tcpdump in subdirectories of the
454 # same directory, with tcpdump statically linked with the libpcap
455 # in question, but we also build a shared library as "libpcap.shareda"
456 # and install *it*, rather than the static library, as "libpcap.a".
458 libpcap.shareda
: $(OBJ
)
460 $(CC
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LDFLAGS
) $(LIBS
)
464 # For platforms that don't support shared libraries (or on which we
465 # don't support shared libraries).
469 scanner.c
: $(srcdir)/scanner.l
470 $(LEX
) -P pcap_
--header-file
=scanner.h
--nounput
-o scanner.c
$<
472 ## Recover from the removal of $@
473 @if
test -f
$@
; then
:; else \
475 $(MAKE
) $(MAKEFLAGS
) scanner.c
; \
478 scanner.o
: scanner.c grammar.h
479 $(CC
) $(FULL_CFLAGS
) -c scanner.c
481 pcap-bpf.o
: pcap_version.h
482 pcap-dag.o
: pcap_version.h
483 pcap-dlpi.o
: pcap_version.h
484 pcap-libdlpi.o
: pcap_version.h
485 pcap-linux.o
: pcap_version.h
486 pcap-nit.o
: pcap_version.h
487 pcap-null.o
: pcap_version.h
488 pcap-pf.o
: pcap_version.h
489 pcap-septel.o
: pcap_version.h
490 pcap-sita.o
: pcap_version.h
491 pcap-snf.o
: pcap_version.h
492 pcap-snit.o
: pcap_version.h
493 pcap-snoop.o
: pcap_version.h
495 grammar.c
: $(srcdir)/grammar.y
496 $(YACC
) -p pcap_
-o grammar.c
-d
$<
498 ## Recover from the removal of $@
499 @if
test -f
$@
; then
:; else \
501 $(MAKE
) $(MAKEFLAGS
) grammar.c
; \
504 grammar.o
: grammar.c scanner.h
505 $(CC
) $(FULL_CFLAGS
) -c grammar.c
507 gencode.o
: $(srcdir)/gencode.c grammar.h scanner.h
508 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/gencode.c
511 $(CC
) $(FULL_CFLAGS
) -c version.c
513 snprintf.o
: $(srcdir)/missing
/snprintf.c
514 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
516 strtok_r.o
: $(srcdir)/missing
/strtok_r.c
517 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strtok_r.c
519 version.c
: $(srcdir)/VERSION
$(srcdir)/version.c.in
$(srcdir)/gen_version.sh
521 # Older programs import this if they want to show the
522 # libpcap version number, rather than calling
523 # pcap_lib_version(), so we need to export it.
526 $(srcdir)/gen_version.sh
$(srcdir)/VERSION
$(srcdir)/version.c.in
$@
528 pcap_version.h
: $(srcdir)/VERSION
$(srcdir)/pcap_version.h.in
$(srcdir)/gen_version.sh
530 $(srcdir)/gen_version.sh
$(srcdir)/VERSION
$(srcdir)/pcap_version.h.in
$@
532 bpf_filter.c
: $(srcdir)/bpf
/net
/bpf_filter.c
534 ln
-s
$(srcdir)/bpf
/net
/bpf_filter.c bpf_filter.c
536 bpf_filter.o
: bpf_filter.c
537 $(CC
) $(FULL_CFLAGS
) -c bpf_filter.c
540 # Generate the pcap-config script.
542 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
543 # for example, the Solaris 9 make man page says
545 # Because make assigns $< and $* as it would for implicit rules
546 # (according to the suffixes list and the directory contents),
547 # they may be unreliable when used within explicit target entries.
549 # and this is an explicit target entry.
551 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
553 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
555 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
560 # Remote pcap daemon.
566 # Test programs - not built by default, and not installed.
570 capturetest
: tests
/capturetest.c libpcap.a
571 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o capturetest
$(srcdir)/tests
/capturetest.c libpcap.a
$(LIBS
)
573 can_set_rfmon_test
: tests
/can_set_rfmon_test.c libpcap.a
574 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o can_set_rfmon_test
$(srcdir)/tests
/can_set_rfmon_test.c libpcap.a
$(LIBS
)
576 filtertest
: tests
/filtertest.c libpcap.a
577 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o filtertest
$(srcdir)/tests
/filtertest.c libpcap.a
$(LIBS
)
579 findalldevstest
: tests
/findalldevstest.c libpcap.a
580 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o findalldevstest
$(srcdir)/tests
/findalldevstest.c libpcap.a
$(LIBS
)
582 opentest
: tests
/opentest.c libpcap.a
583 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o opentest
$(srcdir)/tests
/opentest.c libpcap.a
$(LIBS
)
585 reactivatetest
: tests
/reactivatetest.c libpcap.a
586 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o reactivatetest
$(srcdir)/tests
/reactivatetest.c libpcap.a
$(LIBS
)
588 selpolltest
: tests
/selpolltest.c libpcap.a
589 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o selpolltest
$(srcdir)/tests
/selpolltest.c libpcap.a
$(LIBS
)
591 valgrindtest
: tests
/valgrindtest.c libpcap.a
592 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o valgrindtest
$(srcdir)/tests
/valgrindtest.c libpcap.a
$(LIBS
)
594 install: install-shared install-archive pcap-config @INSTALL_RPCAPD@
595 [ -d
$(DESTDIR
)$(libdir) ] || \
596 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
597 [ -d
$(DESTDIR
)$(includedir) ] || \
598 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
599 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
600 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
601 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
602 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
603 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
604 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
605 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
606 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
607 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
608 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
609 for i in
$(PUBHDR
); do \
610 $(INSTALL_DATA
) $(srcdir)/$$i \
611 $(DESTDIR
)$(includedir)/$$i; done
612 [ -d
$(DESTDIR
)$(bindir) ] || \
613 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
614 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
615 for i in
$(MAN1
); do \
616 $(INSTALL_DATA
) $(srcdir)/$$i \
617 $(DESTDIR
)$(mandir)/man1
/$$i; done
618 for i in
$(MAN3PCAP_NOEXPAND
); do \
619 $(INSTALL_DATA
) $(srcdir)/$$i \
620 $(DESTDIR
)$(mandir)/man3
/$$i; done
621 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
622 $(INSTALL_DATA
) $$i \
623 $(DESTDIR
)$(mandir)/man3
/$$i; done
624 (cd
$(DESTDIR
)$(mandir)/man3
&& \
625 rm -f pcap_datalink_val_to_description
.3pcap
&& \
626 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
627 pcap_datalink_val_to_description
.3pcap
&& \
628 rm -f pcap_dump_fopen
.3pcap
&& \
629 $(LN_S
) pcap_dump_open
.3pcap pcap_dump_fopen
.3pcap
&& \
630 rm -f pcap_freealldevs
.3pcap
&& \
631 $(LN_S
) pcap_findalldevs
.3pcap pcap_freealldevs
.3pcap
&& \
632 rm -f pcap_perror
.3pcap
&& \
633 $(LN_S
) pcap_geterr
.3pcap pcap_perror
.3pcap
&& \
634 rm -f pcap_sendpacket
.3pcap
&& \
635 $(LN_S
) pcap_inject
.3pcap pcap_sendpacket
.3pcap
&& \
636 rm -f pcap_free_datalinks
.3pcap
&& \
637 $(LN_S
) pcap_list_datalinks
.3pcap pcap_free_datalinks
.3pcap
&& \
638 rm -f pcap_free_tstamp_types
.3pcap
&& \
639 $(LN_S
) pcap_list_tstamp_types
.3pcap pcap_free_tstamp_types
.3pcap
&& \
640 rm -f pcap_dispatch
.3pcap
&& \
641 $(LN_S
) pcap_loop
.3pcap pcap_dispatch
.3pcap
&& \
642 rm -f pcap_minor_version
.3pcap
&& \
643 $(LN_S
) pcap_major_version
.3pcap pcap_minor_version
.3pcap
&& \
644 rm -f pcap_next
.3pcap
&& \
645 $(LN_S
) pcap_next_ex
.3pcap pcap_next
.3pcap
&& \
646 rm -f pcap_open_dead_with_tstamp_precision
.3pcap
&& \
647 $(LN_S
) pcap_open_dead
.3pcap \
648 pcap_open_dead_with_tstamp_precision
.3pcap
&& \
649 rm -f pcap_open_offline_with_tstamp_precision
.3pcap
&& \
650 $(LN_S
) pcap_open_offline
.3pcap pcap_open_offline_with_tstamp_precision
.3pcap
&& \
651 rm -f pcap_fopen_offline
.3pcap
&& \
652 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline
.3pcap
&& \
653 rm -f pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
654 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
655 rm -f pcap_tstamp_type_val_to_description
.3pcap
&& \
656 $(LN_S
) pcap_tstamp_type_val_to_name
.3pcap pcap_tstamp_type_val_to_description
.3pcap
&& \
657 rm -f pcap_getnonblock
.3pcap
&& \
658 $(LN_S
) pcap_setnonblock
.3pcap pcap_getnonblock
.3pcap
)
659 for i in
$(MANFILE
); do \
660 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
661 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
662 for i in
$(MANMISC
); do \
663 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
664 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
666 install-shared
: install-shared-
$(DYEXT
)
667 install-shared-so
: libpcap.so
668 [ -d
$(DESTDIR
)$(libdir) ] || \
669 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
670 VER
=`cat $(srcdir)/VERSION`; \
671 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
672 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
673 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
674 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
675 install-shared-dylib
: libpcap.dylib
676 [ -d
$(DESTDIR
)$(libdir) ] || \
677 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
678 VER
=`cat $(srcdir)/VERSION`; \
680 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
681 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
682 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
683 install-shared-sl
: libpcap.sl
684 [ -d
$(DESTDIR
)$(libdir) ] || \
685 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
686 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
687 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
688 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
689 install-shared-shareda
: libpcap.shareda
691 # AIX shared libraries are weird. They're archive libraries
692 # with one or more shared object components.
694 [ -d
$(DESTDIR
)$(libdir) ] || \
695 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
696 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
699 install-archive
: install-archive-
$(DYEXT
)
700 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
702 # Most platforms have separate suffixes for shared and
703 # archive libraries, so we install both.
705 [ -d
$(DESTDIR
)$(libdir) ] || \
706 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
707 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
708 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
709 install-archive-shareda
:
711 # AIX, however, doesn't, so we don't install the archive
716 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) install
718 uninstall: uninstall-shared uninstall-rpcapd
719 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
720 for i in
$(PUBHDR
); do \
721 rm -f
$(DESTDIR
)$(includedir)/$$i; done
722 -rmdir
$(DESTDIR
)$(includedir)/pcap
723 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
724 for i in
$(MAN1
); do \
725 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
726 for i in
$(MAN3PCAP
); do \
727 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
728 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
729 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
730 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
731 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
732 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
733 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
734 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
735 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
736 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
737 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
738 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_dead_with_tstamp_precision
.3pcap
739 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline_with_tstamp_precision
.3pcap
740 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
741 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline_with_tstamp_precision
.3pcap
742 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
743 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_tstamp_type_val_to_description
.3pcap
744 for i in
$(MANFILE
); do \
745 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
746 for i in
$(MANMISC
); do \
747 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
749 uninstall-shared
: uninstall-shared-
$(DYEXT
)
751 VER
=`cat $(srcdir)/VERSION`; \
752 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
753 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
754 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
755 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
756 uninstall-shared-dylib
:
757 VER
=`cat $(srcdir)/VERSION`; \
759 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
760 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
761 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
763 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
764 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
765 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
766 uninstall-shared-shareda
:
767 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
768 uninstall-shared-none
:
771 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) uninstall
775 cd rpcapd
; $(MAKE
) clean
778 rm -f Makefile config.cache config.log config.status \
779 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
781 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
782 rm -rf autom4te.cache
783 cd rpcapd
; $(MAKE
) distclean
789 ctags
-wtd
$(TAGFILES
)
792 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
794 tar cf
- $(CSRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
795 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) | \
796 (cd
$$name; tar xf
-); \
797 tar -c
-z
-f
$$name.
tar.gz
$$name; \
800 depend
: $(GENSRC
) $(GENHDR
) bpf_filter.c
801 $(MKDEP
) -c
$(CC
) -m
$(CFLAGS
) $(DEPENDENCY_CFLAG
) $(DEFS
) $(INCLS
) $(SRC
)
802 cd rpcapd
; $(MAKE
) depend