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.
20 # @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.142 2008-11-22 17:30:24 guy Exp $ (LBL)
23 # Various configurable paths (remember to edit Makefile.in, not Makefile)
28 exec_prefix = @
exec_prefix@
29 datarootdir
= @datarootdir@
30 # Pathname of directory to install the configure program
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.
52 DEFS
= @DEFS@ @V_DEFS@
54 ADDLARCHIVEOBJS
= @ADDLARCHIVEOBJS@
59 V_RPATH_OPT
= @V_RPATH_OPT@
63 FULL_CFLAGS
= $(CCOPT
) $(INCLS
) $(DEFS
) $(CFLAGS
)
66 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
67 INSTALL_DATA
= @INSTALL_DATA@
71 # Flex and bison allow you to specify the prefixes of the global symbols
72 # used by the generated parser. This allows programs to use lex/yacc
73 # and link against libpcap. If you don't have flex or bison, get them.
78 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
79 # Also, gcc does not remove the .o before forking 'as', which can be a
80 # problem if you don't own the file but can write to the directory.
83 $(CC
) $(FULL_CFLAGS
) -c
$(srcdir)/$*.c
85 PSRC
= pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@
86 FSRC
= fad-@V_FINDALLDEVS@.c
88 CSRC
= pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
89 savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
90 bpf_image.c bpf_dump.c
91 GENSRC
= scanner.c grammar.c bpf_filter.c version.c
94 SRC
= $(PSRC
) $(FSRC
) $(CSRC
) $(SSRC
) $(GENSRC
)
96 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
97 # hack the extra indirection
98 OBJ
= $(PSRC
:.c
=.o
) $(FSRC
:.c
=.o
) $(CSRC
:.c
=.o
) $(SSRC
:.c
=.o
) $(GENSRC
:.c
=.o
) $(LIBOBJS
)
137 tests
/findalldevstest.c \
138 tests
/nonblocktest.c \
143 scanner.h tokdefs.h version.h
148 CLEANFILES
= $(OBJ
) libpcap.
* $(TESTS
) \
149 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENSRC
) $(GENHDR
) \
156 pcap_compile
.3pcap.in \
157 pcap_datalink
.3pcap.in \
158 pcap_dump_open
.3pcap.in \
159 pcap_list_datalinks
.3pcap.in \
160 pcap_list_tstamp_types
.3pcap.in \
161 pcap_open_dead
.3pcap.in \
162 pcap_open_offline
.3pcap.in \
163 pcap_set_tstamp_type
.3pcap.in
165 MAN3PCAP_NOEXPAND
= \
166 pcap_activate
.3pcap \
167 pcap_breakloop
.3pcap \
168 pcap_can_set_rfmon
.3pcap \
171 pcap_datalink_name_to_val
.3pcap \
172 pcap_datalink_val_to_name
.3pcap \
174 pcap_dump_close
.3pcap \
175 pcap_dump_file
.3pcap \
176 pcap_dump_flush
.3pcap \
177 pcap_dump_ftell
.3pcap \
180 pcap_findalldevs
.3pcap \
181 pcap_freecode
.3pcap \
182 pcap_get_selectable_fd
.3pcap \
185 pcap_is_swapped
.3pcap \
186 pcap_lib_version
.3pcap \
187 pcap_lookupdev
.3pcap \
188 pcap_lookupnet
.3pcap \
190 pcap_major_version
.3pcap \
192 pcap_offline_filter
.3pcap \
193 pcap_open_live
.3pcap \
194 pcap_set_buffer_size
.3pcap \
195 pcap_set_datalink
.3pcap \
196 pcap_set_promisc
.3pcap \
197 pcap_set_rfmon
.3pcap \
198 pcap_set_snaplen
.3pcap \
199 pcap_set_timeout
.3pcap \
200 pcap_setdirection
.3pcap \
201 pcap_setfilter
.3pcap \
202 pcap_setnonblock
.3pcap \
203 pcap_snapshot
.3pcap \
205 pcap_statustostr
.3pcap \
206 pcap_strerror
.3pcap \
207 pcap_tstamp_type_name_to_val
.3pcap \
208 pcap_tstamp_type_val_to_name
.3pcap
210 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
213 pcap-savefile.manfile.in
216 pcap-filter.manmisc.in \
217 pcap-linktype.manmisc.in \
218 pcap-tstamp.manmisc.in
224 ChmodBPF
/StartupParameters.plist \
239 SUNOS4
/nit_if.o.sparc \
240 SUNOS4
/nit_if.o.sun3 \
241 SUNOS4
/nit_if.o.sun4c
.4.0.3c \
245 bpf
/net
/bpf_filter.c \
284 org.tcpdump.chmod_bpf.plist \
285 packaging
/pcap.spec.in \
319 Win32
/Include
/Gnuc.h \
320 Win32
/Include
/addrinfo.h \
321 Win32
/Include
/bittypes.h \
322 Win32
/Include
/cdecl_ext.h \
323 Win32
/Include
/inetprivate.h \
324 Win32
/Include
/ip6_misc.h \
325 Win32
/Include
/sockstorage.h \
326 Win32
/Include
/arpa
/nameser.h \
327 Win32
/Include
/net
/if.h \
328 Win32
/Include
/net
/netdb.h \
329 Win32
/Include
/net
/paths.h \
330 Win32
/Prj
/libpcap.dsp \
331 Win32
/Prj
/libpcap.dsw \
333 Win32
/Src
/gai_strerror.c \
334 Win32
/Src
/getaddrinfo.c \
335 Win32
/Src
/getnetbynm.c \
336 Win32
/Src
/getnetent.c \
338 Win32
/Src
/getservent.c \
339 Win32
/Src
/inet_aton.c \
340 Win32
/Src
/inet_net.c \
341 Win32
/Src
/inet_pton.c
343 all: libpcap.a shared pcap-config
347 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
350 shared
: libpcap.
$(DYEXT
)
354 VER
=`cat $(srcdir)/VERSION`; \
355 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
356 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER $(LDFLAGS
) \
357 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
360 # The following rule succeeds, but the result is untested.
362 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
363 # its full path as the install_name, and with the compatibility and
364 # current version both set to 1. The compatibility version is set to
365 # 1 so that programs built with a newer version of the library will run
366 # against older versions; multi-platform software probably will fail if
367 # it uses APIs added in the newer version, but Mac OS X-specific software
368 # will use weak linking and check at run time whether those APIs are
371 # We also use "A" as the major version, and 1 as the compatibility version,
372 # but set the current version to the value in VERSION, with any non-numeric
373 # stuff stripped off (the compatibility and current version must be of the
374 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
377 libpcap.dylib
: $(OBJ
)
379 VER
=`cat $(srcdir)/VERSION`; \
382 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
383 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) \
384 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
385 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
386 -compatibility_version
$$COMPAT_VER \
387 -current_version
$$CURRENT_VER
390 # The HP-UX linker manual says that the convention for a versioned library
391 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
392 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
395 # The manual also says "library-level versioning" (think "sonames") was
396 # added in HP-UX 10.0.
398 # XXX - this assumes we're using the HP linker, rather than the GNU
399 # linker, even with GCC.
402 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
403 rm -f libpcap.
$$MAJOR_VER
404 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
405 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
406 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
409 # AIX is different from everybody else. A shared library is an archive
410 # library with one or more shared-object components. We still build a
411 # normal static archive library on AIX, for the benefit of the traditional
412 # scheme of building libpcap and tcpdump in subdirectories of the
413 # same directory, with tcpdump statically linked with the libpcap
414 # in question, but we also build a shared library as "libpcap.shareda"
415 # and install *it*, rather than the static library, as "libpcap.a".
417 libpcap.shareda
: $(OBJ
)
419 $(CC
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LDFLAGS
) $(LIBS
)
423 # For platforms that don't support shared libraries (or on which we
424 # don't support shared libraries).
428 scanner.c
: $(srcdir)/scanner.l
430 $(srcdir)/runlex.sh
$(LEX
) -o
$@
$<
432 scanner.o
: scanner.c tokdefs.h
433 $(CC
) $(FULL_CFLAGS
) -c scanner.c
438 grammar.c
: $(srcdir)/grammar.y
439 @
rm -f grammar.c tokdefs.h
446 $(CC
) $(FULL_CFLAGS
) -Dyylval
=pcap_lval
-c grammar.c
449 $(CC
) $(FULL_CFLAGS
) -c version.c
451 snprintf.o
: $(srcdir)/missing
/snprintf.c
452 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
454 version.c
: $(srcdir)/VERSION
456 if grep GIT
${srcdir}/VERSION
>/dev
/null
; then \
457 read ver
<${srcdir}/VERSION
; \
458 echo
$$ver | tr
-d
'\012'; \
461 cat
${srcdir}/VERSION
; \
462 fi | sed
-e
's/.*/char pcap_version[] = "&";/' > $@
465 # NOTE: this really is supposed to be static; importing a string
466 # from a shared library does not work very well on many
467 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
468 # so we make the version string static and return it from
469 # a function, which does work.
471 version.h
: $(srcdir)/VERSION
473 if grep GIT
${srcdir}/VERSION
>/dev
/null
; then \
474 read ver
<${srcdir}/VERSION
; \
475 echo
$$ver | tr
-d
'\012'; \
478 cat
${srcdir}/VERSION
; \
479 fi | sed
-e
's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
481 bpf_filter.c
: $(srcdir)/bpf
/net
/bpf_filter.c
483 ln
-s
$(srcdir)/bpf
/net
/bpf_filter.c bpf_filter.c
485 bpf_filter.o
: bpf_filter.c
486 $(CC
) $(FULL_CFLAGS
) -c bpf_filter.c
489 # Generate the pcap-config script.
491 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
492 # for example, the Solaris 9 make man page says
494 # Because make assigns $< and $* as it would for implicit rules
495 # (according to the suffixes list and the directory contents),
496 # they may be unreliable when used within explicit target entries.
498 # and this is an explicit target entry.
500 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
502 pcap-config
: $(srcdir)/pcap-config.in
504 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
509 # Test programs - not built by default, and not installed.
513 filtertest
: tests
/filtertest.c libpcap.a
514 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o filtertest
$(srcdir)/tests
/filtertest.c libpcap.a
$(LIBS
)
516 findalldevstest
: tests
/findalldevstest.c libpcap.a
517 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o findalldevstest
$(srcdir)/tests
/findalldevstest.c libpcap.a
$(LIBS
)
519 nonblocktest
: tests
/nonblocktest.c libpcap.a
520 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o nonblocktest
$(srcdir)/tests
/nonblocktest.c libpcap.a
$(LIBS
)
522 opentest
: tests
/opentest.c libpcap.a
523 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o opentest
$(srcdir)/tests
/opentest.c libpcap.a
$(LIBS
)
525 selpolltest
: tests
/selpolltest.c libpcap.a
526 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o selpolltest
$(srcdir)/tests
/selpolltest.c libpcap.a
$(LIBS
)
528 install: install-shared install-archive pcap-config
529 [ -d
$(DESTDIR
)$(libdir) ] || \
530 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
531 [ -d
$(DESTDIR
)$(includedir) ] || \
532 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
533 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
534 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
535 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
536 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
537 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
538 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
539 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
540 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
541 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
542 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
543 for i in
$(PUBHDR
); do \
544 $(INSTALL_DATA
) $(srcdir)/$$i \
545 $(DESTDIR
)$(includedir)/$$i; done
546 [ -d
$(DESTDIR
)$(bindir) ] || \
547 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
548 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
549 for i in
$(MAN1
); do \
550 $(INSTALL_DATA
) $(srcdir)/$$i \
551 $(DESTDIR
)$(mandir)/man1
/$$i; done
552 for i in
$(MAN3PCAP_NOEXPAND
); do \
553 $(INSTALL_DATA
) $(srcdir)/$$i \
554 $(DESTDIR
)$(mandir)/man3
/$$i; done
555 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
556 $(INSTALL_DATA
) $$i \
557 $(DESTDIR
)$(mandir)/man3
/$$i; done
558 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
559 ln
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_name
.3pcap \
560 $(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
561 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
562 ln
$(DESTDIR
)$(mandir)/man3
/pcap_dump_open
.3pcap \
563 $(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
564 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
565 ln
$(DESTDIR
)$(mandir)/man3
/pcap_findalldevs
.3pcap \
566 $(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
567 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
568 ln
$(DESTDIR
)$(mandir)/man3
/pcap_geterr
.3pcap \
569 $(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
570 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
571 ln
$(DESTDIR
)$(mandir)/man3
/pcap_inject
.3pcap \
572 $(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
573 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
574 ln
$(DESTDIR
)$(mandir)/man3
/pcap_list_datalinks
.3pcap \
575 $(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
576 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
577 ln
$(DESTDIR
)$(mandir)/man3
/pcap_list_tstamp_types
.3pcap \
578 $(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
579 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
580 ln
$(DESTDIR
)$(mandir)/man3
/pcap_loop
.3pcap \
581 $(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
582 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
583 ln
$(DESTDIR
)$(mandir)/man3
/pcap_major_version
.3pcap \
584 $(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
585 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
586 ln
$(DESTDIR
)$(mandir)/man3
/pcap_next_ex
.3pcap \
587 $(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
588 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
589 ln
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline
.3pcap \
590 $(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
591 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
592 ln
$(DESTDIR
)$(mandir)/man3
/pcap_setnonblock
.3pcap \
593 $(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
594 for i in
$(MANFILE
); do \
595 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
596 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
597 for i in
$(MANMISC
); do \
598 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
599 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
601 install-shared
: install-shared-
$(DYEXT
)
602 install-shared-so
: libpcap.so
603 [ -d
$(DESTDIR
)$(libdir) ] || \
604 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
605 VER
=`cat $(srcdir)/VERSION`; \
606 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
607 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
608 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
609 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
610 install-shared-dylib
: libpcap.dylib
611 [ -d
$(DESTDIR
)$(libdir) ] || \
612 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
613 VER
=`cat $(srcdir)/VERSION`; \
615 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
616 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
617 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
618 install-shared-sl
: libpcap.sl
619 [ -d
$(DESTDIR
)$(libdir) ] || \
620 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
621 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
622 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
623 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
624 install-shared-shareda
: libpcap.shareda
626 # AIX shared libraries are weird. They're archive libraries
627 # with one or more shared object components.
629 [ -d
$(DESTDIR
)$(libdir) ] || \
630 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
631 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
634 install-archive
: install-archive-
$(DYEXT
)
635 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
637 # Most platforms have separate suffixes for shared and
638 # archive libraries, so we install both.
640 [ -d
$(DESTDIR
)$(libdir) ] || \
641 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
642 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
643 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
644 install-archive-shareda
:
646 # AIX, however, doesn't, so we don't install the archive
650 uninstall: uninstall-shared
651 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
652 for i in
$(PUBHDR
); do \
653 rm -f
$(DESTDIR
)$(includedir)/$$i; done
654 -rmdir
$(DESTDIR
)$(includedir)/pcap
655 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
656 for i in
$(MAN1
); do \
657 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
658 for i in
$(MAN3PCAP
); do \
659 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
660 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
661 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
662 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
663 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
664 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
665 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
666 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
667 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
668 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
669 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
670 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
671 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
672 for i in
$(MANFILE
); do \
673 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
674 for i in
$(MANMISC
); do \
675 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
677 uninstall-shared
: uninstall-shared-
$(DYEXT
)
679 VER
=`cat $(srcdir)/VERSION`; \
680 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
681 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
682 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
683 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
684 uninstall-shared-dylib
:
685 VER
=`cat $(srcdir)/VERSION`; \
687 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
688 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
689 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
691 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
692 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
693 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
694 uninstall-shared-shareda
:
695 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
696 uninstall-shared-none
:
702 rm -f Makefile config.cache config.log config.status \
703 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
705 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
706 rm -rf autom4te.cache
709 ctags
-wtd
$(TAGFILES
)
711 packaging
/pcap.spec
: packaging
/pcap.spec.in VERSION
712 RPMVERSION
=`cat VERSION | sed s/-.*//g`; \
713 sed
-e s
/@VERSION@
/$$RPMVERSION/ -e s
/@NAME@
/libpcap-
`cat VERSION`/ $< > $@
716 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
718 tar cf
- $(CSRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
719 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) | \
720 (cd
$$name; tar xf
-); \
721 tar -c
-z
-f
$$name.
tar.gz
$$name; \
724 depend
: $(GENSRC
) $(GENHDR
) bpf_filter.c
725 .
/mkdep
-c
$(CC
) $(DEFS
) $(INCLS
) $(SRC
)
727 Makefile
: Makefile.in config.status
729 @echo your Makefile was out of date
, now run
$(MAKE
) again