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@ @NETFILTER_SRC@ @CANUSB_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 \
140 tests
/reactivatetest.c \
144 scanner.h tokdefs.h version.h
149 CLEANFILES
= $(OBJ
) libpcap.
* $(TESTS
) \
150 $(PROG
)-`cat $(srcdir)/VERSION`.
tar.gz
$(GENSRC
) $(GENHDR
) \
157 pcap_compile
.3pcap.in \
158 pcap_datalink
.3pcap.in \
159 pcap_dump_open
.3pcap.in \
160 pcap_list_datalinks
.3pcap.in \
161 pcap_list_tstamp_types
.3pcap.in \
162 pcap_open_dead
.3pcap.in \
163 pcap_open_offline
.3pcap.in \
164 pcap_set_tstamp_type
.3pcap.in
166 MAN3PCAP_NOEXPAND
= \
167 pcap_activate
.3pcap \
168 pcap_breakloop
.3pcap \
169 pcap_can_set_rfmon
.3pcap \
172 pcap_datalink_name_to_val
.3pcap \
173 pcap_datalink_val_to_name
.3pcap \
175 pcap_dump_close
.3pcap \
176 pcap_dump_file
.3pcap \
177 pcap_dump_flush
.3pcap \
178 pcap_dump_ftell
.3pcap \
181 pcap_findalldevs
.3pcap \
182 pcap_freecode
.3pcap \
183 pcap_get_selectable_fd
.3pcap \
186 pcap_is_swapped
.3pcap \
187 pcap_lib_version
.3pcap \
188 pcap_lookupdev
.3pcap \
189 pcap_lookupnet
.3pcap \
191 pcap_major_version
.3pcap \
193 pcap_offline_filter
.3pcap \
194 pcap_open_live
.3pcap \
195 pcap_set_buffer_size
.3pcap \
196 pcap_set_datalink
.3pcap \
197 pcap_set_promisc
.3pcap \
198 pcap_set_rfmon
.3pcap \
199 pcap_set_snaplen
.3pcap \
200 pcap_set_timeout
.3pcap \
201 pcap_setdirection
.3pcap \
202 pcap_setfilter
.3pcap \
203 pcap_setnonblock
.3pcap \
204 pcap_snapshot
.3pcap \
206 pcap_statustostr
.3pcap \
207 pcap_strerror
.3pcap \
208 pcap_tstamp_type_name_to_val
.3pcap \
209 pcap_tstamp_type_val_to_name
.3pcap
211 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
214 pcap-savefile.manfile.in
217 pcap-filter.manmisc.in \
218 pcap-linktype.manmisc.in \
219 pcap-tstamp.manmisc.in
225 ChmodBPF
/StartupParameters.plist \
240 SUNOS4
/nit_if.o.sparc \
241 SUNOS4
/nit_if.o.sun3 \
242 SUNOS4
/nit_if.o.sun4c
.4.0.3c \
246 bpf
/net
/bpf_filter.c \
285 org.tcpdump.chmod_bpf.plist \
286 packaging
/pcap.spec.in \
292 pcap-canusb-linux.c \
293 pcap-canusb-linux.h \
305 pcap-netfilter-linux.c \
306 pcap-netfilter-linux.h \
324 Win32
/Include
/Gnuc.h \
325 Win32
/Include
/addrinfo.h \
326 Win32
/Include
/bittypes.h \
327 Win32
/Include
/cdecl_ext.h \
328 Win32
/Include
/inetprivate.h \
329 Win32
/Include
/ip6_misc.h \
330 Win32
/Include
/sockstorage.h \
331 Win32
/Include
/arpa
/nameser.h \
332 Win32
/Include
/net
/if.h \
333 Win32
/Include
/net
/netdb.h \
334 Win32
/Include
/net
/paths.h \
335 Win32
/Prj
/libpcap.dsp \
336 Win32
/Prj
/libpcap.dsw \
338 Win32
/Src
/gai_strerror.c \
339 Win32
/Src
/getaddrinfo.c \
340 Win32
/Src
/getnetbynm.c \
341 Win32
/Src
/getnetent.c \
343 Win32
/Src
/getservent.c \
344 Win32
/Src
/inet_aton.c \
345 Win32
/Src
/inet_net.c \
346 Win32
/Src
/inet_pton.c
348 all: libpcap.a shared pcap-config
352 $(AR
) rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
355 shared
: libpcap.
$(DYEXT
)
359 VER
=`cat $(srcdir)/VERSION`; \
360 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
361 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER $(LDFLAGS
) \
362 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
365 # The following rule succeeds, but the result is untested.
367 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
368 # its full path as the install_name, and with the compatibility and
369 # current version both set to 1. The compatibility version is set to
370 # 1 so that programs built with a newer version of the library will run
371 # against older versions; multi-platform software probably will fail if
372 # it uses APIs added in the newer version, but Mac OS X-specific software
373 # will use weak linking and check at run time whether those APIs are
376 # We also use "A" as the major version, and 1 as the compatibility version,
377 # but set the current version to the value in VERSION, with any non-numeric
378 # stuff stripped off (the compatibility and current version must be of the
379 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
382 libpcap.dylib
: $(OBJ
)
384 VER
=`cat $(srcdir)/VERSION`; \
387 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
388 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) \
389 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
390 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
391 -compatibility_version
$$COMPAT_VER \
392 -current_version
$$CURRENT_VER
395 # The HP-UX linker manual says that the convention for a versioned library
396 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
397 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
400 # The manual also says "library-level versioning" (think "sonames") was
401 # added in HP-UX 10.0.
403 # XXX - this assumes we're using the HP linker, rather than the GNU
404 # linker, even with GCC.
407 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
408 rm -f libpcap.
$$MAJOR_VER
409 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
410 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
411 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
414 # AIX is different from everybody else. A shared library is an archive
415 # library with one or more shared-object components. We still build a
416 # normal static archive library on AIX, for the benefit of the traditional
417 # scheme of building libpcap and tcpdump in subdirectories of the
418 # same directory, with tcpdump statically linked with the libpcap
419 # in question, but we also build a shared library as "libpcap.shareda"
420 # and install *it*, rather than the static library, as "libpcap.a".
422 libpcap.shareda
: $(OBJ
)
424 $(CC
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LDFLAGS
) $(LIBS
)
428 # For platforms that don't support shared libraries (or on which we
429 # don't support shared libraries).
433 scanner.c
: $(srcdir)/scanner.l
435 $(srcdir)/runlex.sh
$(LEX
) -o
$@
$<
437 scanner.o
: scanner.c tokdefs.h
438 $(CC
) $(FULL_CFLAGS
) -c scanner.c
443 grammar.c
: $(srcdir)/grammar.y
444 @
rm -f grammar.c tokdefs.h
451 $(CC
) $(FULL_CFLAGS
) -Dyylval
=pcap_lval
-c grammar.c
454 $(CC
) $(FULL_CFLAGS
) -c version.c
456 snprintf.o
: $(srcdir)/missing
/snprintf.c
457 $(CC
) $(FULL_CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
459 version.c
: $(srcdir)/VERSION
461 if grep GIT
${srcdir}/VERSION
>/dev
/null
; then \
462 read ver
<${srcdir}/VERSION
; \
463 echo
$$ver | tr
-d
'\012'; \
466 cat
${srcdir}/VERSION
; \
467 fi | sed
-e
's/.*/char pcap_version[] = "&";/' > $@
470 # NOTE: this really is supposed to be static; importing a string
471 # from a shared library does not work very well on many
472 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
473 # so we make the version string static and return it from
474 # a function, which does work.
476 version.h
: $(srcdir)/VERSION
478 if grep GIT
${srcdir}/VERSION
>/dev
/null
; then \
479 read ver
<${srcdir}/VERSION
; \
480 echo
$$ver | tr
-d
'\012'; \
483 cat
${srcdir}/VERSION
; \
484 fi | sed
-e
's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
486 bpf_filter.c
: $(srcdir)/bpf
/net
/bpf_filter.c
488 ln
-s
$(srcdir)/bpf
/net
/bpf_filter.c bpf_filter.c
490 bpf_filter.o
: bpf_filter.c
491 $(CC
) $(FULL_CFLAGS
) -c bpf_filter.c
494 # Generate the pcap-config script.
496 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
497 # for example, the Solaris 9 make man page says
499 # Because make assigns $< and $* as it would for implicit rules
500 # (according to the suffixes list and the directory contents),
501 # they may be unreliable when used within explicit target entries.
503 # and this is an explicit target entry.
505 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
507 pcap-config
: $(srcdir)/pcap-config.in .
/config.status
509 .
/config.status
--file
=$@.tmp
:$(srcdir)/pcap-config.in
514 # Test programs - not built by default, and not installed.
518 filtertest
: tests
/filtertest.c libpcap.a
519 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o filtertest
$(srcdir)/tests
/filtertest.c libpcap.a
$(LIBS
)
521 findalldevstest
: tests
/findalldevstest.c libpcap.a
522 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o findalldevstest
$(srcdir)/tests
/findalldevstest.c libpcap.a
$(LIBS
)
524 nonblocktest
: tests
/nonblocktest.c libpcap.a
525 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o nonblocktest
$(srcdir)/tests
/nonblocktest.c libpcap.a
$(LIBS
)
527 opentest
: tests
/opentest.c libpcap.a
528 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o opentest
$(srcdir)/tests
/opentest.c libpcap.a
$(LIBS
)
530 selpolltest
: tests
/selpolltest.c libpcap.a
531 $(CC
) $(FULL_CFLAGS
) -I.
-L.
-o selpolltest
$(srcdir)/tests
/selpolltest.c libpcap.a
$(LIBS
)
533 install: install-shared install-archive pcap-config
534 [ -d
$(DESTDIR
)$(libdir) ] || \
535 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
536 [ -d
$(DESTDIR
)$(includedir) ] || \
537 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
538 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
539 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
540 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
541 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
542 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
543 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
544 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
545 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
546 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
547 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
548 for i in
$(PUBHDR
); do \
549 $(INSTALL_DATA
) $(srcdir)/$$i \
550 $(DESTDIR
)$(includedir)/$$i; done
551 [ -d
$(DESTDIR
)$(bindir) ] || \
552 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
553 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
554 for i in
$(MAN1
); do \
555 $(INSTALL_DATA
) $(srcdir)/$$i \
556 $(DESTDIR
)$(mandir)/man1
/$$i; done
557 for i in
$(MAN3PCAP_NOEXPAND
); do \
558 $(INSTALL_DATA
) $(srcdir)/$$i \
559 $(DESTDIR
)$(mandir)/man3
/$$i; done
560 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
561 $(INSTALL_DATA
) $$i \
562 $(DESTDIR
)$(mandir)/man3
/$$i; done
563 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
564 ln
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_name
.3pcap \
565 $(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
566 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
567 ln
$(DESTDIR
)$(mandir)/man3
/pcap_dump_open
.3pcap \
568 $(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
569 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
570 ln
$(DESTDIR
)$(mandir)/man3
/pcap_findalldevs
.3pcap \
571 $(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
572 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
573 ln
$(DESTDIR
)$(mandir)/man3
/pcap_geterr
.3pcap \
574 $(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
575 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
576 ln
$(DESTDIR
)$(mandir)/man3
/pcap_inject
.3pcap \
577 $(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
578 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
579 ln
$(DESTDIR
)$(mandir)/man3
/pcap_list_datalinks
.3pcap \
580 $(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
581 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
582 ln
$(DESTDIR
)$(mandir)/man3
/pcap_list_tstamp_types
.3pcap \
583 $(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
584 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
585 ln
$(DESTDIR
)$(mandir)/man3
/pcap_loop
.3pcap \
586 $(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
587 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
588 ln
$(DESTDIR
)$(mandir)/man3
/pcap_major_version
.3pcap \
589 $(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
590 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
591 ln
$(DESTDIR
)$(mandir)/man3
/pcap_next_ex
.3pcap \
592 $(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
593 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
594 ln
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline
.3pcap \
595 $(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
596 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
597 ln
$(DESTDIR
)$(mandir)/man3
/pcap_setnonblock
.3pcap \
598 $(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
599 for i in
$(MANFILE
); do \
600 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
601 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
602 for i in
$(MANMISC
); do \
603 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
604 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
606 install-shared
: install-shared-
$(DYEXT
)
607 install-shared-so
: libpcap.so
608 [ -d
$(DESTDIR
)$(libdir) ] || \
609 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
610 VER
=`cat $(srcdir)/VERSION`; \
611 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
612 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
613 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
614 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
615 install-shared-dylib
: libpcap.dylib
616 [ -d
$(DESTDIR
)$(libdir) ] || \
617 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
618 VER
=`cat $(srcdir)/VERSION`; \
620 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
621 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
622 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
623 install-shared-sl
: libpcap.sl
624 [ -d
$(DESTDIR
)$(libdir) ] || \
625 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
626 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
627 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
628 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
629 install-shared-shareda
: libpcap.shareda
631 # AIX shared libraries are weird. They're archive libraries
632 # with one or more shared object components.
634 [ -d
$(DESTDIR
)$(libdir) ] || \
635 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
636 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
639 install-archive
: install-archive-
$(DYEXT
)
640 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
642 # Most platforms have separate suffixes for shared and
643 # archive libraries, so we install both.
645 [ -d
$(DESTDIR
)$(libdir) ] || \
646 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
647 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
648 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
649 install-archive-shareda
:
651 # AIX, however, doesn't, so we don't install the archive
655 uninstall: uninstall-shared
656 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
657 for i in
$(PUBHDR
); do \
658 rm -f
$(DESTDIR
)$(includedir)/$$i; done
659 -rmdir
$(DESTDIR
)$(includedir)/pcap
660 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
661 for i in
$(MAN1
); do \
662 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
663 for i in
$(MAN3PCAP
); do \
664 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
665 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
666 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
667 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_freealldevs
.3pcap
668 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
669 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
670 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_datalinks
.3pcap
671 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_free_tstamp_types
.3pcap
672 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
673 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
674 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
675 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
676 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
677 for i in
$(MANFILE
); do \
678 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
679 for i in
$(MANMISC
); do \
680 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
682 uninstall-shared
: uninstall-shared-
$(DYEXT
)
684 VER
=`cat $(srcdir)/VERSION`; \
685 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
686 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
687 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
688 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
689 uninstall-shared-dylib
:
690 VER
=`cat $(srcdir)/VERSION`; \
692 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
693 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
694 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
696 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
697 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
698 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
699 uninstall-shared-shareda
:
700 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
701 uninstall-shared-none
:
707 rm -f Makefile config.cache config.log config.status \
708 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
710 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
711 rm -rf autom4te.cache
714 ctags
-wtd
$(TAGFILES
)
716 packaging
/pcap.spec
: packaging
/pcap.spec.in VERSION
717 RPMVERSION
=`cat VERSION | sed s/-.*//g`; \
718 sed
-e s
/@VERSION@
/$$RPMVERSION/ -e s
/@NAME@
/libpcap-
`cat VERSION`/ $< > $@
721 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
723 tar cf
- $(CSRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
724 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) | \
725 (cd
$$name; tar xf
-); \
726 tar -c
-z
-f
$$name.
tar.gz
$$name; \
729 depend
: $(GENSRC
) $(GENHDR
) bpf_filter.c
730 .
/mkdep
-c
$(CC
) $(DEFS
) $(INCLS
) $(SRC
)
732 Makefile
: Makefile.in config.status
734 @echo your Makefile was out of date
, now run
$(MAKE
) again