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 \
160 tests
/valgrindtest.c \
161 tests
/capturetest.c \
162 tests
/can_set_rfmon_test.c \
164 tests
/findalldevstest.c \
166 tests
/reactivatetest.c \
170 scanner.h grammar.h pcap_version.h
175 CLEANFILES
= $(OBJ
) libpcap.
* $(TESTS
) \
176 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENSRC
) $(GENHDR
) \
183 pcap_compile
.3pcap.in \
184 pcap_datalink
.3pcap.in \
185 pcap_dump_open
.3pcap.in \
186 pcap_get_tstamp_precision
.3pcap.in \
187 pcap_list_datalinks
.3pcap.in \
188 pcap_list_tstamp_types
.3pcap.in \
189 pcap_open_dead
.3pcap.in \
190 pcap_open_offline
.3pcap.in \
191 pcap_set_tstamp_precision
.3pcap.in \
192 pcap_set_tstamp_type
.3pcap.in
194 MAN3PCAP_NOEXPAND
= \
195 pcap_activate
.3pcap \
196 pcap_breakloop
.3pcap \
197 pcap_can_set_rfmon
.3pcap \
200 pcap_datalink_name_to_val
.3pcap \
201 pcap_datalink_val_to_name
.3pcap \
203 pcap_dump_close
.3pcap \
204 pcap_dump_file
.3pcap \
205 pcap_dump_flush
.3pcap \
206 pcap_dump_ftell
.3pcap \
209 pcap_findalldevs
.3pcap \
210 pcap_freecode
.3pcap \
211 pcap_get_selectable_fd
.3pcap \
214 pcap_is_swapped
.3pcap \
215 pcap_lib_version
.3pcap \
216 pcap_lookupdev
.3pcap \
217 pcap_lookupnet
.3pcap \
219 pcap_major_version
.3pcap \
221 pcap_offline_filter
.3pcap \
222 pcap_open_live
.3pcap \
223 pcap_set_buffer_size
.3pcap \
224 pcap_set_datalink
.3pcap \
225 pcap_set_immediate_mode
.3pcap \
226 pcap_set_promisc
.3pcap \
227 pcap_set_rfmon
.3pcap \
228 pcap_set_snaplen
.3pcap \
229 pcap_set_timeout
.3pcap \
230 pcap_setdirection
.3pcap \
231 pcap_setfilter
.3pcap \
232 pcap_setnonblock
.3pcap \
233 pcap_snapshot
.3pcap \
235 pcap_statustostr
.3pcap \
236 pcap_strerror
.3pcap \
237 pcap_tstamp_type_name_to_val
.3pcap \
238 pcap_tstamp_type_val_to_name
.3pcap
240 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
243 pcap-savefile.manfile.in
246 pcap-filter.manmisc.in \
247 pcap-linktype.manmisc.in \
248 pcap-tstamp.manmisc.in
254 ChmodBPF
/StartupParameters.plist \
261 Makefile-devel-adds \
273 SUNOS4
/nit_if.o.sparc \
274 SUNOS4
/nit_if.o.sun3 \
275 SUNOS4
/nit_if.o.sun4c
.4.0.3c \
279 bpf
/net
/bpf_filter.c \
282 cmake
/preconfigure.cmake \
283 config
/have_siocglifconf.c \
295 gen_version_header.sh \
310 missing
/win_snprintf.c \
325 org.tcpdump.chmod_bpf.plist \
329 pcap-bt-monitor-linux.c \
330 pcap-bt-monitor-linux.h \
345 pcap-netfilter-linux.c \
346 pcap-netfilter-linux.h \
369 tests
/CMakeLists.txt \
371 Win32
/Include
/Gnuc.h \
372 Win32
/Include
/net
/if.h \
373 Win32
/Prj
/wpcap.sln \
374 Win32
/Prj
/wpcap.vcxproj \
375 Win32
/Prj
/wpcap.vcxproj.filters
377 all: libpcap.a shared
$(RPCAPD
) pcap-config
381 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
384 shared
: libpcap.
$(DYEXT
)
388 VER
=`cat $(srcdir)/VERSION`; \
389 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
390 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER $(LDFLAGS
) \
391 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
394 # The following rule succeeds, but the result is untested.
396 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
397 # its full path as the install_name, and with the compatibility and
398 # current version both set to 1. The compatibility version is set to
399 # 1 so that programs built with a newer version of the library will run
400 # against older versions; multi-platform software probably will fail if
401 # it uses APIs added in the newer version, but Mac OS X-specific software
402 # will use weak linking and check at run time whether those APIs are
405 # We also use "A" as the major version, and 1 as the compatibility version,
406 # but set the current version to the value in VERSION, with any non-numeric
407 # stuff stripped off (the compatibility and current version must be of the
408 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
411 libpcap.dylib
: $(OBJ
)
413 VER
=`cat $(srcdir)/VERSION`; \
416 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
417 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) \
418 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
419 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
420 -compatibility_version
$$COMPAT_VER \
421 -current_version
$$CURRENT_VER
424 # The HP-UX linker manual says that the convention for a versioned library
425 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
426 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
429 # The manual also says "library-level versioning" (think "sonames") was
430 # added in HP-UX 10.0.
432 # XXX - this assumes we're using the HP linker, rather than the GNU
433 # linker, even with GCC.
436 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
437 rm -f libpcap.
$$MAJOR_VER
438 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
439 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
440 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
443 # AIX is different from everybody else. A shared library is an archive
444 # library with one or more shared-object components. We still build a
445 # normal static archive library on AIX, for the benefit of the traditional
446 # scheme of building libpcap and tcpdump in subdirectories of the
447 # same directory, with tcpdump statically linked with the libpcap
448 # in question, but we also build a shared library as "libpcap.shareda"
449 # and install *it*, rather than the static library, as "libpcap.a".
451 libpcap.shareda
: $(OBJ
)
453 $(CC
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LDFLAGS
) $(LIBS
)
457 # For platforms that don't support shared libraries (or on which we
458 # don't support shared libraries).
462 scanner.c
: $(srcdir)/scanner.l
463 $(LEX
) -P pcap_
--header-file
=scanner.h
--nounput
-o scanner.c
$<
465 ## Recover from the removal of $@
466 @if
test -f
$@
; then
:; else \
468 $(MAKE
) $(MAKEFLAGS
) scanner.c
; \
471 scanner.o
: scanner.c grammar.h
472 $(CC
) $(FULL_CFLAGS
) -c scanner.c
474 pcap.o
: pcap_version.h
476 grammar.c
: $(srcdir)/grammar.y
477 $(YACC
) -p pcap_
-o grammar.c
-d
$<
479 ## Recover from the removal of $@
480 @if
test -f
$@
; then
:; else \
482 $(MAKE
) $(MAKEFLAGS
) grammar.c
; \
485 grammar.o
: grammar.c scanner.h
486 $(CC
) $(FULL_CFLAGS
) -c grammar.c
488 gencode.o
: $(srcdir)/gencode.c grammar.h scanner.h
489 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/gencode.c
492 $(CC
) $(FULL_CFLAGS
) -c version.c
494 snprintf.o
: $(srcdir)/missing
/snprintf.c
495 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
497 strtok_r.o
: $(srcdir)/missing
/strtok_r.c
498 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/strtok_r.c
500 version.c
: $(srcdir)/VERSION
$(srcdir)/gen_version_c.sh
502 # Older programs import this if they want to show the
503 # libpcap version number, rather than calling
504 # pcap_lib_version(), so we need to export it.
507 $(srcdir)/gen_version_c.sh
$(srcdir)/VERSION
$@
509 pcap_version.h
: $(srcdir)/VERSION
$(srcdir)/pcap_version.h.in
$(srcdir)/gen_version_header.sh
511 $(srcdir)/gen_version_header.sh
$(srcdir)/VERSION
$(srcdir)/pcap_version.h.in
$@
513 bpf_filter.c
: $(srcdir)/bpf
/net
/bpf_filter.c
515 ln
-s
$(srcdir)/bpf
/net
/bpf_filter.c bpf_filter.c
517 bpf_filter.o
: bpf_filter.c
518 $(CC
) $(FULL_CFLAGS
) -c bpf_filter.c
521 # Generate the pcap-config script.
523 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
524 # for example, the Solaris 9 make man page says
526 # Because make assigns $< and $* as it would for implicit rules
527 # (according to the suffixes list and the directory contents),
528 # they may be unreliable when used within explicit target entries.
530 # and this is an explicit target entry.
532 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
534 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
536 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
541 # Remote pcap daemon.
547 # Test programs - not built by default, and not installed.
551 capturetest
: tests
/capturetest.c libpcap.a
552 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o capturetest
$(srcdir)/tests
/capturetest.c libpcap.a
$(LIBS
)
554 can_set_rfmon_test
: tests
/can_set_rfmon_test.c libpcap.a
555 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o can_set_rfmon_test
$(srcdir)/tests
/can_set_rfmon_test.c libpcap.a
$(LIBS
)
557 filtertest
: tests
/filtertest.c libpcap.a
558 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o filtertest
$(srcdir)/tests
/filtertest.c libpcap.a
$(LIBS
)
560 findalldevstest
: tests
/findalldevstest.c libpcap.a
561 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o findalldevstest
$(srcdir)/tests
/findalldevstest.c libpcap.a
$(LIBS
)
563 opentest
: tests
/opentest.c libpcap.a
564 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o opentest
$(srcdir)/tests
/opentest.c libpcap.a
$(LIBS
)
566 reactivatetest
: tests
/reactivatetest.c libpcap.a
567 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o reactivatetest
$(srcdir)/tests
/reactivatetest.c libpcap.a
$(LIBS
)
569 selpolltest
: tests
/selpolltest.c libpcap.a
570 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o selpolltest
$(srcdir)/tests
/selpolltest.c libpcap.a
$(LIBS
)
572 valgrindtest
: tests
/valgrindtest.c libpcap.a
573 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o valgrindtest
$(srcdir)/tests
/valgrindtest.c libpcap.a
$(LIBS
)
575 install: install-shared install-archive pcap-config @INSTALL_RPCAPD@
576 [ -d
$(DESTDIR
)$(libdir) ] || \
577 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
578 [ -d
$(DESTDIR
)$(includedir) ] || \
579 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
580 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
581 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
582 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
583 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
584 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
585 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
586 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
587 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
588 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
589 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
590 for i in
$(PUBHDR
); do \
591 $(INSTALL_DATA
) $(srcdir)/$$i \
592 $(DESTDIR
)$(includedir)/$$i; done
593 [ -d
$(DESTDIR
)$(bindir) ] || \
594 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
595 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
596 for i in
$(MAN1
); do \
597 $(INSTALL_DATA
) $(srcdir)/$$i \
598 $(DESTDIR
)$(mandir)/man1
/$$i; done
599 for i in
$(MAN3PCAP_NOEXPAND
); do \
600 $(INSTALL_DATA
) $(srcdir)/$$i \
601 $(DESTDIR
)$(mandir)/man3
/$$i; done
602 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
603 $(INSTALL_DATA
) $$i \
604 $(DESTDIR
)$(mandir)/man3
/$$i; done
605 (cd
$(DESTDIR
)$(mandir)/man3
&& \
606 rm -f pcap_datalink_val_to_description
.3pcap
&& \
607 $(LN_S
) pcap_datalink_val_to_name
.3pcap \
608 pcap_datalink_val_to_description
.3pcap
&& \
609 rm -f pcap_dump_fopen
.3pcap
&& \
610 $(LN_S
) pcap_dump_open
.3pcap pcap_dump_fopen
.3pcap
&& \
611 rm -f pcap_freealldevs
.3pcap
&& \
612 $(LN_S
) pcap_findalldevs
.3pcap pcap_freealldevs
.3pcap
&& \
613 rm -f pcap_perror
.3pcap
&& \
614 $(LN_S
) pcap_geterr
.3pcap pcap_perror
.3pcap
&& \
615 rm -f pcap_sendpacket
.3pcap
&& \
616 $(LN_S
) pcap_inject
.3pcap pcap_sendpacket
.3pcap
&& \
617 rm -f pcap_free_datalinks
.3pcap
&& \
618 $(LN_S
) pcap_list_datalinks
.3pcap pcap_free_datalinks
.3pcap
&& \
619 rm -f pcap_free_tstamp_types
.3pcap
&& \
620 $(LN_S
) pcap_list_tstamp_types
.3pcap pcap_free_tstamp_types
.3pcap
&& \
621 rm -f pcap_dispatch
.3pcap
&& \
622 $(LN_S
) pcap_loop
.3pcap pcap_dispatch
.3pcap
&& \
623 rm -f pcap_minor_version
.3pcap
&& \
624 $(LN_S
) pcap_major_version
.3pcap pcap_minor_version
.3pcap
&& \
625 rm -f pcap_next
.3pcap
&& \
626 $(LN_S
) pcap_next_ex
.3pcap pcap_next
.3pcap
&& \
627 rm -f pcap_open_dead_with_tstamp_precision
.3pcap
&& \
628 $(LN_S
) pcap_open_dead
.3pcap \
629 pcap_open_dead_with_tstamp_precision
.3pcap
&& \
630 rm -f pcap_open_offline_with_tstamp_precision
.3pcap
&& \
631 $(LN_S
) pcap_open_offline
.3pcap pcap_open_offline_with_tstamp_precision
.3pcap
&& \
632 rm -f pcap_fopen_offline
.3pcap
&& \
633 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline
.3pcap
&& \
634 rm -f pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
635 $(LN_S
) pcap_open_offline
.3pcap pcap_fopen_offline_with_tstamp_precision
.3pcap
&& \
636 rm -f pcap_tstamp_type_val_to_description
.3pcap
&& \
637 $(LN_S
) pcap_tstamp_type_val_to_name
.3pcap pcap_tstamp_type_val_to_description
.3pcap
&& \
638 rm -f pcap_getnonblock
.3pcap
&& \
639 $(LN_S
) pcap_setnonblock
.3pcap pcap_getnonblock
.3pcap
)
640 for i in
$(MANFILE
); do \
641 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
642 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
643 for i in
$(MANMISC
); do \
644 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
645 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
647 install-shared
: install-shared-
$(DYEXT
)
648 install-shared-so
: libpcap.so
649 [ -d
$(DESTDIR
)$(libdir) ] || \
650 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
651 VER
=`cat $(srcdir)/VERSION`; \
652 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
653 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
654 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
655 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
656 install-shared-dylib
: libpcap.dylib
657 [ -d
$(DESTDIR
)$(libdir) ] || \
658 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
659 VER
=`cat $(srcdir)/VERSION`; \
661 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
662 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
663 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
664 install-shared-sl
: libpcap.sl
665 [ -d
$(DESTDIR
)$(libdir) ] || \
666 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
667 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
668 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
669 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
670 install-shared-shareda
: libpcap.shareda
672 # AIX shared libraries are weird. They're archive libraries
673 # with one or more shared object components.
675 [ -d
$(DESTDIR
)$(libdir) ] || \
676 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
677 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
680 install-archive
: install-archive-
$(DYEXT
)
681 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
683 # Most platforms have separate suffixes for shared and
684 # archive libraries, so we install both.
686 [ -d
$(DESTDIR
)$(libdir) ] || \
687 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
688 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
689 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
690 install-archive-shareda
:
692 # AIX, however, doesn't, so we don't install the archive
697 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) install
699 uninstall: uninstall-shared uninstall-rpcapd
700 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
701 for i in
$(PUBHDR
); do \
702 rm -f
$(DESTDIR
)$(includedir)/$$i; done
703 -rmdir
$(DESTDIR
)$(includedir)/pcap
704 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
705 for i in
$(MAN1
); do \
706 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
707 for i in
$(MAN3PCAP
); do \
708 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
709 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
710 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
711 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
712 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
713 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
714 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
715 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
716 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
717 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
718 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
719 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_dead_with_tstamp_precision
.3pcap
720 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline_with_tstamp_precision
.3pcap
721 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
722 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline_with_tstamp_precision
.3pcap
723 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
724 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_tstamp_type_val_to_description
.3pcap
725 for i in
$(MANFILE
); do \
726 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
727 for i in
$(MANMISC
); do \
728 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
730 uninstall-shared
: uninstall-shared-
$(DYEXT
)
732 VER
=`cat $(srcdir)/VERSION`; \
733 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
734 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
735 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
736 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
737 uninstall-shared-dylib
:
738 VER
=`cat $(srcdir)/VERSION`; \
740 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
741 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
742 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
744 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
745 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
746 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
747 uninstall-shared-shareda
:
748 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
749 uninstall-shared-none
:
752 cd rpcapd
; $(MAKE
) DESTDIR
=$(DESTDIR
) uninstall
756 cd rpcapd
; $(MAKE
) clean
759 rm -f Makefile config.cache config.log config.status \
760 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
762 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
763 rm -rf autom4te.cache
764 cd rpcapd
; $(MAKE
) distclean
770 ctags
-wtd
$(TAGFILES
)
773 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
775 tar cf
- $(CSRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
776 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) | \
777 (cd
$$name; tar xf
-); \
778 tar -c
-z
-f
$$name.
tar.gz
$$name; \
781 depend
: $(GENSRC
) $(GENHDR
) bpf_filter.c
782 $(MKDEP
) -c
$(CC
) -m
$(CFLAGS
) $(DEPENDENCY_CFLAG
) $(DEFS
) $(INCLS
) $(SRC
)
783 cd rpcapd
; $(MAKE
) depend