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.
50 DEFS
= @DEFS@ @V_DEFS@
52 ADDLARCHIVEOBJS
= @ADDLARCHIVEOBJS@
56 V_RPATH_OPT
= @V_RPATH_OPT@
60 CFLAGS
= $(CCOPT
) $(INCLS
) $(DEFS
)
63 INSTALL_PROGRAM
= @INSTALL_PROGRAM@
64 INSTALL_DATA
= @INSTALL_DATA@
68 # Flex and bison allow you to specify the prefixes of the global symbols
69 # used by the generated parser. This allows programs to use lex/yacc
70 # and link against libpcap. If you don't have flex or bison, get them.
75 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
76 # Also, gcc does not remove the .o before forking 'as', which can be a
77 # problem if you don't own the file but can write to the directory.
80 $(CC
) $(CFLAGS
) -c
$(srcdir)/$*.c
82 PSRC
= pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@
83 FSRC
= fad-@V_FINDALLDEVS@.c
85 CSRC
= pcap.c inet.c gencode.c optimize.c nametoaddr.c \
86 etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c
87 GENSRC
= scanner.c grammar.c version.c
90 SRC
= $(PSRC
) $(FSRC
) $(CSRC
) $(SSRC
) $(GENSRC
)
92 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
93 # hack the extra indirection
94 OBJ
= $(PSRC
:.c
=.o
) $(FSRC
:.c
=.o
) $(CSRC
:.c
=.o
) $(SSRC
:.c
=.o
) $(GENSRC
:.c
=.o
) $(LIBOBJS
)
121 scanner.h tokdefs.h version.h
126 CLEANFILES
= $(OBJ
) libpcap.
* filtertest findalldevstest selpolltest \
127 opentest
$(PROG
)-`cat VERSION`.
tar.gz
$(GENSRC
) $(GENHDR
) \
134 pcap_compile
.3pcap.in \
135 pcap_datalink
.3pcap.in \
136 pcap_dump_open
.3pcap.in \
137 pcap_list_datalinks
.3pcap.in \
138 pcap_open_dead
.3pcap.in \
139 pcap_open_offline
.3pcap.in
141 MAN3PCAP_NOEXPAND
= \
142 pcap_activate
.3pcap \
143 pcap_breakloop
.3pcap \
144 pcap_can_set_rfmon
.3pcap \
147 pcap_datalink_name_to_val
.3pcap \
148 pcap_datalink_val_to_name
.3pcap \
150 pcap_dump_close
.3pcap \
151 pcap_dump_file
.3pcap \
152 pcap_dump_flush
.3pcap \
153 pcap_dump_ftell
.3pcap \
156 pcap_findalldevs
.3pcap \
157 pcap_freealldevs
.3pcap \
158 pcap_freecode
.3pcap \
159 pcap_free_datalinks
.3pcap \
160 pcap_get_selectable_fd
.3pcap \
163 pcap_is_swapped
.3pcap \
164 pcap_lib_version
.3pcap \
165 pcap_lookupdev
.3pcap \
166 pcap_lookupnet
.3pcap \
168 pcap_major_version
.3pcap \
170 pcap_offline_filter
.3pcap \
171 pcap_open_live
.3pcap \
172 pcap_set_buffer_size
.3pcap \
173 pcap_set_datalink
.3pcap \
174 pcap_set_promisc
.3pcap \
175 pcap_set_rfmon
.3pcap \
176 pcap_set_snaplen
.3pcap \
177 pcap_set_timeout
.3pcap \
178 pcap_setdirection
.3pcap \
179 pcap_setfilter
.3pcap \
180 pcap_setnonblock
.3pcap \
181 pcap_snapshot
.3pcap \
183 pcap_statustostr
.3pcap \
186 MAN3PCAP
= $(MAN3PCAP_NOEXPAND
) $(MAN3PCAP_EXPAND
:.in
=)
189 pcap-savefile.manfile.in
192 pcap-filter.manmisc.in \
193 pcap-linktype.manmisc.in
198 ChmodBPF
/StartupParameters.plist \
213 SUNOS4
/nit_if.o.sparc \
214 SUNOS4
/nit_if.o.sun3 \
215 SUNOS4
/nit_if.o.sun4c
.4.0.3c \
219 bpf
/net
/bpf_filter.c \
261 org.tcpdump.chmod_bpf.plist \
262 packaging
/pcap.spec.in \
293 Win32
/Include
/Gnuc.h \
294 Win32
/Include
/addrinfo.h \
295 Win32
/Include
/bittypes.h \
296 Win32
/Include
/cdecl_ext.h \
297 Win32
/Include
/inetprivate.h \
298 Win32
/Include
/ip6_misc.h \
299 Win32
/Include
/sockstorage.h \
300 Win32
/Include
/arpa
/nameser.h \
301 Win32
/Include
/net
/if.h \
302 Win32
/Include
/net
/netdb.h \
303 Win32
/Include
/net
/paths.h \
304 Win32
/Prj
/libpcap.dsp \
305 Win32
/Prj
/libpcap.dsw \
307 Win32
/Src
/gai_strerror.c \
308 Win32
/Src
/getaddrinfo.c \
309 Win32
/Src
/getnetbynm.c \
310 Win32
/Src
/getnetent.c \
312 Win32
/Src
/getservent.c \
313 Win32
/Src
/inet_aton.c \
314 Win32
/Src
/inet_net.c \
315 Win32
/Src
/inet_pton.c
317 all: libpcap.a shared pcap-config
321 ar rc
$@
$(OBJ
) $(ADDLARCHIVEOBJS
)
324 shared
: libpcap.
$(DYEXT
)
328 VER
=`cat $(srcdir)/VERSION`; \
329 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
330 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@
$@.
$$MAJOR_VER $(LDFLAGS
) \
331 -o
$@.
$$VER $(OBJ
) $(ADDLOBJS
) $(LIBS
)
334 # The following rule succeeds, but the result is untested.
336 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
337 # its full path as the install_name, and with the compatibility and
338 # current version both set to 1. The compatibility version is set to
339 # 1 so that programs built with a newer version of the library will run
340 # against older versions; multi-platform software probably will fail if
341 # it uses APIs added in the newer version, but Mac OS X-specific software
342 # will use weak linking and check at run time whether those APIs are
345 # We also use "A" as the major version, and 1 as the compatibility version,
346 # but set the current version to the value in VERSION, with any non-numeric
347 # stuff stripped off (the compatibility and current version must be of the
348 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
351 libpcap.dylib
: $(OBJ
)
353 VER
=`cat $(srcdir)/VERSION`; \
356 CURRENT_VER
=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
357 $(CC
) -dynamiclib
-undefined error
$(LDFLAGS
) \
358 -o libpcap.
$$VER.dylib
$(OBJ
) $(ADDLOBJS
) $(LIBS
) \
359 -install_name
$(libdir)/libpcap.
$$MAJOR_VER.dylib \
360 -compatibility_version
$$COMPAT_VER \
361 -current_version
$$CURRENT_VER
364 # The HP-UX linker manual says that the convention for a versioned library
365 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
366 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
369 # The manual also says "library-level versioning" (think "sonames") was
370 # added in HP-UX 10.0.
372 # XXX - this assumes we're using the HP linker, rather than the GNU
373 # linker, even with GCC.
376 @MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
377 rm -f libpcap.
$$MAJOR_VER
378 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
379 ld -b
$(LDFLAGS
) -o libpcap.
$$MAJOR_VER +h libpcap.
$$MAJOR_VER \
380 $(OBJ
) $(ADDLOBJS
) $(LIBS
)
383 # AIX is different from everybody else. A shared library is an archive
384 # library with one or more shared-object components. We still build a
385 # normal static archive library on AIX, for the benefit of the traditional
386 # scheme of building libpcap and tcpdump in subdirectories of the
387 # same directory, with tcpdump statically linked with the libpcap
388 # in question, but we also build a shared library as "libpcap.shareda"
389 # and install *it*, rather than the static library, as "libpcap.a".
391 libpcap.shareda
: $(OBJ
)
393 $(CC
) @V_SHLIB_OPT@
-o shr.o
$(OBJ
) $(ADDLOBJS
) $(LIBS
)
397 # For platforms that don't support shared libraries (or on which we
398 # don't support shared libraries).
402 scanner.c
: $(srcdir)/scanner.l
404 $(srcdir)/runlex.sh
$(LEX
) -o
$@
$<
406 scanner.o
: scanner.c tokdefs.h
407 $(CC
) $(CFLAGS
) -c scanner.c
412 grammar.c
: $(srcdir)/grammar.y
413 @
rm -f grammar.c tokdefs.h
420 $(CC
) $(CFLAGS
) -Dyylval
=pcap_lval
-c grammar.c
423 $(CC
) $(CFLAGS
) -c version.c
425 snprintf.o
: $(srcdir)/missing
/snprintf.c
426 $(CC
) $(CFLAGS
) -o
$@
-c
$(srcdir)/missing
/snprintf.c
428 version.c
: $(srcdir)/VERSION
430 sed
-e
's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION
> $@
433 # NOTE: this really is supposed to be static; importing a string
434 # from a shared library does not work very well on many
435 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
436 # so we make the version string static and return it from
437 # a function, which does work.
439 version.h
: $(srcdir)/VERSION
441 sed
-e
's/.*/static const char pcap_version_string[] = "libpcap version &";/' $(srcdir)/VERSION
> $@
443 bpf_filter.c
: $(srcdir)/bpf
/net
/bpf_filter.c
445 ln
-s
$(srcdir)/bpf
/net
/bpf_filter.c bpf_filter.c
447 bpf_filter.o
: bpf_filter.c
448 $(CC
) $(CFLAGS
) -c bpf_filter.c
451 # Generate the pcap-config script.
453 pcap-config
: $(srcdir)/pcap-config.in
455 sed
-e
's|@includedir[@]|$(includedir)|g' \
456 -e
's|@libdir[@]|$(libdir)|g' \
457 -e
's|@LIBS[@]|$(LIBS)|g' \
458 -e
's|@V_RPATH_OPT[@]|$(V_RPATH_OPT)|g' \
459 $(srcdir)/pcap-config.in
>$@.tmp
464 # Test programs - not built by default, and not installed.
466 filtertest
: filtertest.c libpcap.a
467 $(CC
) $(CFLAGS
) -I.
-L.
-o filtertest filtertest.c libpcap.a
$(LIBS
)
469 findalldevstest
: findalldevstest.c libpcap.a
470 $(CC
) $(CFLAGS
) -I.
-L.
-o findalldevstest findalldevstest.c libpcap.a
$(LIBS
)
472 selpolltest
: selpolltest.c libpcap.a
473 $(CC
) $(CFLAGS
) -I.
-L.
-o selpolltest selpolltest.c libpcap.a
$(LIBS
)
475 opentest
: opentest.c libpcap.a
476 $(CC
) $(CFLAGS
) -I.
-L.
-o opentest opentest.c libpcap.a
$(LIBS
)
478 install: install-shared install-archive pcap-config
479 [ -d
$(DESTDIR
)$(libdir) ] || \
480 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
481 [ -d
$(DESTDIR
)$(includedir) ] || \
482 (mkdir
-p
$(DESTDIR
)$(includedir); chmod
755 $(DESTDIR
)$(includedir))
483 [ -d
$(DESTDIR
)$(includedir)/pcap
] || \
484 (mkdir
-p
$(DESTDIR
)$(includedir)/pcap
; chmod
755 $(DESTDIR
)$(includedir)/pcap
)
485 [ -d
$(DESTDIR
)$(mandir)/man1
] || \
486 (mkdir
-p
$(DESTDIR
)$(mandir)/man1
; chmod
755 $(DESTDIR
)$(mandir)/man1
)
487 [ -d
$(DESTDIR
)$(mandir)/man3
] || \
488 (mkdir
-p
$(DESTDIR
)$(mandir)/man3
; chmod
755 $(DESTDIR
)$(mandir)/man3
)
489 [ -d
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
] || \
490 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
)
491 [ -d
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
] || \
492 (mkdir
-p
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
; chmod
755 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
)
493 for i in
$(PUBHDR
); do \
494 $(INSTALL_DATA
) $(srcdir)/$$i \
495 $(DESTDIR
)$(includedir)/$$i; done
496 [ -d
$(DESTDIR
)$(bindir) ] || \
497 (mkdir
-p
$(DESTDIR
)$(bindir); chmod
755 $(DESTDIR
)$(bindir))
498 $(INSTALL_PROGRAM
) pcap-config
$(DESTDIR
)$(bindir)/pcap-config
499 for i in
$(MAN1
); do \
500 $(INSTALL_DATA
) $(srcdir)/$$i \
501 $(DESTDIR
)$(mandir)/man1
/$$i; done
502 for i in
$(MAN3PCAP_NOEXPAND
); do \
503 $(INSTALL_DATA
) $(srcdir)/$$i \
504 $(DESTDIR
)$(mandir)/man3
/$$i; done
505 for i in
$(MAN3PCAP_EXPAND
:.in
=); do \
506 $(INSTALL_DATA
) $$i \
507 $(DESTDIR
)$(mandir)/man3
/$$i; done
508 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
509 ln
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_name
.3pcap \
510 $(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
511 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
512 ln
$(DESTDIR
)$(mandir)/man3
/pcap_dump_open
.3pcap \
513 $(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
514 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
515 ln
$(DESTDIR
)$(mandir)/man3
/pcap_geterr
.3pcap \
516 $(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
517 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
518 ln
$(DESTDIR
)$(mandir)/man3
/pcap_inject
.3pcap \
519 $(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
520 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
521 ln
$(DESTDIR
)$(mandir)/man3
/pcap_loop
.3pcap \
522 $(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
523 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
524 ln
$(DESTDIR
)$(mandir)/man3
/pcap_major_version
.3pcap \
525 $(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
526 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
527 ln
$(DESTDIR
)$(mandir)/man3
/pcap_next_ex
.3pcap \
528 $(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
529 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
530 ln
$(DESTDIR
)$(mandir)/man3
/pcap_open_offline
.3pcap \
531 $(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
532 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
533 ln
$(DESTDIR
)$(mandir)/man3
/pcap_setnonblock
.3pcap \
534 $(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
535 for i in
$(MANFILE
); do \
536 $(INSTALL_DATA
) `echo $$i | sed 's/.manfile.in/.manfile/'` \
537 $(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
538 for i in
$(MANMISC
); do \
539 $(INSTALL_DATA
) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
540 $(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
542 install-shared
: install-shared-
$(DYEXT
)
543 install-shared-so
: libpcap.so
544 [ -d
$(DESTDIR
)$(libdir) ] || \
545 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
546 VER
=`cat $(srcdir)/VERSION`; \
547 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
548 $(INSTALL_PROGRAM
) libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
549 ln
-sf libpcap.so.
$$VER $(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
550 ln
-sf libpcap.so.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.so
551 install-shared-dylib
: libpcap.dylib
552 [ -d
$(DESTDIR
)$(libdir) ] || \
553 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
554 VER
=`cat $(srcdir)/VERSION`; \
556 $(INSTALL_PROGRAM
) libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
557 ln
-sf libpcap.
$$VER.dylib
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
558 ln
-sf libpcap.
$$MAJOR_VER.dylib
$(DESTDIR
)$(libdir)/libpcap.dylib
559 install-shared-sl
: libpcap.sl
560 [ -d
$(DESTDIR
)$(libdir) ] || \
561 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
562 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
563 $(INSTALL_PROGRAM
) libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)
564 ln
-sf libpcap.
$$MAJOR_VER $(DESTDIR
)$(libdir)/libpcap.sl
565 install-shared-shareda
: libpcap.shareda
567 # AIX shared libraries are weird. They're archive libraries
568 # with one or more shared object components.
570 [ -d
$(DESTDIR
)$(libdir) ] || \
571 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
572 $(INSTALL_PROGRAM
) libpcap.shareda
$(DESTDIR
)$(libdir)/libpcap.a
575 install-archive
: install-archive-
$(DYEXT
)
576 install-archive-so install-archive-dylib install-archive-sl install-archive-none
: libpcap.a
578 # Most platforms have separate suffixes for shared and
579 # archive libraries, so we install both.
581 [ -d
$(DESTDIR
)$(libdir) ] || \
582 (mkdir
-p
$(DESTDIR
)$(libdir); chmod
755 $(DESTDIR
)$(libdir))
583 $(INSTALL_DATA
) libpcap.a
$(DESTDIR
)$(libdir)/libpcap.a
584 $(RANLIB
) $(DESTDIR
)$(libdir)/libpcap.a
585 install-archive-shareda
:
587 # AIX, however, doesn't, so we don't install the archive
591 uninstall: uninstall-shared
592 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
593 for i in
$(PUBHDR
); do \
594 rm -f
$(DESTDIR
)$(includedir)/$$i; done
595 -rmdir
$(DESTDIR
)$(includedir)/pcap
596 rm -f
$(DESTDIR
)/$(bindir)/pcap-config
597 for i in
$(MAN1
); do \
598 rm -f
$(DESTDIR
)$(mandir)/man1
/$$i; done
599 for i in
$(MAN3PCAP
); do \
600 rm -f
$(DESTDIR
)$(mandir)/man3
/$$i; done
601 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_datalink_val_to_description
.3pcap
602 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dump_fopen
.3pcap
603 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_perror
.3pcap
604 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_sendpacket
.3pcap
605 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_dispatch
.3pcap
606 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_minor_version
.3pcap
607 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_next
.3pcap
608 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_fopen_offline
.3pcap
609 rm -f
$(DESTDIR
)$(mandir)/man3
/pcap_getnonblock
.3pcap
610 for i in
$(MANFILE
); do \
611 rm -f
$(DESTDIR
)$(mandir)/man@MAN_FILE_FORMATS@
/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
612 for i in
$(MANMISC
); do \
613 rm -f
$(DESTDIR
)$(mandir)/man@MAN_MISC_INFO@
/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
615 uninstall-shared
: uninstall-shared-
$(DYEXT
)
617 VER
=`cat $(srcdir)/VERSION`; \
618 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
619 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$VER; \
620 rm -f
$(DESTDIR
)$(libdir)/libpcap.so.
$$MAJOR_VER; \
621 rm -f
$(DESTDIR
)$(libdir)/libpcap.so
622 uninstall-shared-dylib
:
623 VER
=`cat $(srcdir)/VERSION`; \
625 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$VER.dylib
; \
626 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER.dylib
; \
627 rm -f
$(DESTDIR
)$(libdir)/libpcap.dylib
629 MAJOR_VER
=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
630 rm -f
$(DESTDIR
)$(libdir)/libpcap.
$$MAJOR_VER; \
631 rm -f
$(DESTDIR
)$(libdir)/libpcap.sl
632 uninstall-shared-shareda
:
633 rm -f
$(DESTDIR
)$(libdir)/libpcap.a
634 uninstall-shared-none
:
640 rm -f Makefile config.cache config.log config.status \
641 config.h gnuc.h os-proto.h bpf_filter.c pcap-config \
643 rm -f
$(MAN3PCAP_EXPAND
:.in
=) $(MANFILE
:.in
=) $(MANMISC
:.in
=)
644 rm -rf autom4te.cache
647 ctags
-wtd
$(TAGFILES
)
649 packaging
/pcap.spec
: packaging
/pcap.spec.in VERSION
650 RPMVERSION
=`cat VERSION | sed s/-.*//g`; \
651 sed
-e s
/@VERSION@
/$$RPMVERSION/ -e s
/@NAME@
/libpcap-
`cat VERSION`/ $< > $@
654 @cwd
=`pwd` ; dir=`basename $$cwd` ; name
=$(PROG
)-`cat VERSION` ; \
656 tar cf
- $(CSRC
) $(HDR
) $(MAN1
) $(MAN3PCAP_EXPAND
) \
657 $(MAN3PCAP_NOEXPAND
) $(MANFILE
) $(MANMISC
) $(EXTRA_DIST
) | \
658 (cd
$$name; tar xf
-); \
659 tar -c
-z
-f
$$name.
tar.gz
$$name; \
662 depend
: $(GENSRC
) $(GENHDR
) bpf_filter.c
663 .
/mkdep
-c
$(CC
) $(DEFS
) $(INCLS
) $(SRC
)
665 Makefile
: Makefile.in config.status
667 @echo your Makefile was out of date
, now run
$(MAKE
) again