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@
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 \
303 pcap-netfilter-linux.c \
304 pcap-netfilter-linux.h \
322 Win32/Include/Gnuc.h \
323 Win32/Include/addrinfo.h \
324 Win32/Include/bittypes.h \
325 Win32/Include/cdecl_ext.h \
326 Win32/Include/inetprivate.h \
327 Win32/Include/ip6_misc.h \
328 Win32/Include/sockstorage.h \
329 Win32/Include/arpa/nameser.h \
330 Win32/Include/net/if.h \
331 Win32/Include/net/netdb.h \
332 Win32/Include/net/paths.h \
333 Win32/Prj/libpcap.dsp \
334 Win32/Prj/libpcap.dsw \
336 Win32/Src/gai_strerror.c \
337 Win32/Src/getaddrinfo.c \
338 Win32/Src/getnetbynm.c \
339 Win32/Src/getnetent.c \
341 Win32/Src/getservent.c \
342 Win32/Src/inet_aton.c \
343 Win32/Src/inet_net.c \
344 Win32/Src/inet_pton.c
346 all: libpcap.a shared pcap-config
350 $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
353 shared: libpcap.$(DYEXT)
357 VER=`cat $(srcdir)/VERSION`; \
358 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
359 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \
360 -o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS)
363 # The following rule succeeds, but the result is untested.
365 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
366 # its full path as the install_name, and with the compatibility and
367 # current version both set to 1. The compatibility version is set to
368 # 1 so that programs built with a newer version of the library will run
369 # against older versions; multi-platform software probably will fail if
370 # it uses APIs added in the newer version, but Mac OS X-specific software
371 # will use weak linking and check at run time whether those APIs are
374 # We also use "A" as the major version, and 1 as the compatibility version,
375 # but set the current version to the value in VERSION, with any non-numeric
376 # stuff stripped off (the compatibility and current version must be of the
377 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
380 libpcap.dylib: $(OBJ)
382 VER=`cat $(srcdir)/VERSION`; \
385 CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
386 $(CC) -dynamiclib -undefined error $(LDFLAGS) \
387 -o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJS) $(LIBS) \
388 -install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \
389 -compatibility_version $$COMPAT_VER \
390 -current_version $$CURRENT_VER
393 # The HP-UX linker manual says that the convention for a versioned library
394 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
395 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
398 # The manual also says "library-level versioning" (think "sonames") was
399 # added in HP-UX 10.0.
401 # XXX - this assumes we're using the HP linker, rather than the GNU
402 # linker, even with GCC.
405 @MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
406 rm -f libpcap.$$MAJOR_VER
407 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
408 ld -b $(LDFLAGS) -o libpcap.$$MAJOR_VER +h libpcap.$$MAJOR_VER \
409 $(OBJ) $(ADDLOBJS) $(LIBS)
412 # AIX is different from everybody else. A shared library is an archive
413 # library with one or more shared-object components. We still build a
414 # normal static archive library on AIX, for the benefit of the traditional
415 # scheme of building libpcap and tcpdump in subdirectories of the
416 # same directory, with tcpdump statically linked with the libpcap
417 # in question, but we also build a shared library as "libpcap.shareda"
418 # and install *it*, rather than the static library, as "libpcap.a".
420 libpcap.shareda: $(OBJ)
422 $(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS)
426 # For platforms that don't support shared libraries (or on which we
427 # don't support shared libraries).
431 scanner.c: $(srcdir)/scanner.l
433 $(srcdir)/runlex.sh $(LEX) -o$@ $<
435 scanner.o: scanner.c tokdefs.h
436 $(CC) $(FULL_CFLAGS) -c scanner.c
441 grammar.c: $(srcdir)/grammar.y
442 @rm -f grammar.c tokdefs.h
449 $(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c
452 $(CC) $(FULL_CFLAGS) -c version.c
454 snprintf.o: $(srcdir)/missing/snprintf.c
455 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
457 version.c: $(srcdir)/VERSION
459 if grep GIT ${srcdir}/VERSION >/dev/null; then \
460 read ver <${srcdir}/VERSION; \
461 echo $$ver | tr -d '\012'; \
464 cat ${srcdir}/VERSION; \
465 fi | sed -e 's/.*/char pcap_version[] = "&";/' > $@
468 # NOTE: this really is supposed to be static; importing a string
469 # from a shared library does not work very well on many
470 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
471 # so we make the version string static and return it from
472 # a function, which does work.
474 version.h: $(srcdir)/VERSION
476 if grep GIT ${srcdir}/VERSION >/dev/null; then \
477 read ver <${srcdir}/VERSION; \
478 echo $$ver | tr -d '\012'; \
481 cat ${srcdir}/VERSION; \
482 fi | sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
484 bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
486 ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
488 bpf_filter.o: bpf_filter.c
489 $(CC) $(FULL_CFLAGS) -c bpf_filter.c
492 # Generate the pcap-config script.
494 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
495 # for example, the Solaris 9 make man page says
497 # Because make assigns $< and $* as it would for implicit rules
498 # (according to the suffixes list and the directory contents),
499 # they may be unreliable when used within explicit target entries.
501 # and this is an explicit target entry.
503 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
505 pcap-config: $(srcdir)/pcap-config.in ./config.status
507 ./config.status --file=$@.tmp:$(srcdir)/pcap-config.in
512 # Test programs - not built by default, and not installed.
516 filtertest: tests/filtertest.c libpcap.a
517 $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS)
519 findalldevstest: tests/findalldevstest.c libpcap.a
520 $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS)
522 nonblocktest: tests/nonblocktest.c libpcap.a
523 $(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/tests/nonblocktest.c libpcap.a $(LIBS)
525 opentest: tests/opentest.c libpcap.a
526 $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS)
528 selpolltest: tests/selpolltest.c libpcap.a
529 $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS)
531 install: install-shared install-archive pcap-config
532 [ -d $(DESTDIR)$(libdir) ] || \
533 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
534 [ -d $(DESTDIR)$(includedir) ] || \
535 (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
536 [ -d $(DESTDIR)$(includedir)/pcap ] || \
537 (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
538 [ -d $(DESTDIR)$(mandir)/man1 ] || \
539 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
540 [ -d $(DESTDIR)$(mandir)/man3 ] || \
541 (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3)
542 [ -d $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@ ] || \
543 (mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
544 [ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
545 (mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
546 for i in $(PUBHDR); do \
547 $(INSTALL_DATA) $(srcdir)/$$i \
548 $(DESTDIR)$(includedir)/$$i; done
549 [ -d $(DESTDIR)$(bindir) ] || \
550 (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
551 $(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
552 for i in $(MAN1); do \
553 $(INSTALL_DATA) $(srcdir)/$$i \
554 $(DESTDIR)$(mandir)/man1/$$i; done
555 for i in $(MAN3PCAP_NOEXPAND); do \
556 $(INSTALL_DATA) $(srcdir)/$$i \
557 $(DESTDIR)$(mandir)/man3/$$i; done
558 for i in $(MAN3PCAP_EXPAND:.in=); do \
559 $(INSTALL_DATA) $$i \
560 $(DESTDIR)$(mandir)/man3/$$i; done
561 rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
562 ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
563 $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
564 rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
565 ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
566 $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
567 rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
568 ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \
569 $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
570 rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
571 ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
572 $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
573 rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
574 ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
575 $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
576 rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
577 ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \
578 $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
579 rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
580 ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \
581 $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
582 rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
583 ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
584 $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
585 rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
586 ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
587 $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
588 rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
589 ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
590 $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
591 rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
592 ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
593 $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
594 rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
595 ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
596 $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
597 for i in $(MANFILE); do \
598 $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
599 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
600 for i in $(MANMISC); do \
601 $(INSTALL_DATA) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
602 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
604 install-shared: install-shared-$(DYEXT)
605 install-shared-so: libpcap.so
606 [ -d $(DESTDIR)$(libdir) ] || \
607 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
608 VER=`cat $(srcdir)/VERSION`; \
609 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
610 $(INSTALL_PROGRAM) libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
611 ln -sf libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
612 ln -sf libpcap.so.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.so
613 install-shared-dylib: libpcap.dylib
614 [ -d $(DESTDIR)$(libdir) ] || \
615 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
616 VER=`cat $(srcdir)/VERSION`; \
618 $(INSTALL_PROGRAM) libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
619 ln -sf libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
620 ln -sf libpcap.$$MAJOR_VER.dylib $(DESTDIR)$(libdir)/libpcap.dylib
621 install-shared-sl: libpcap.sl
622 [ -d $(DESTDIR)$(libdir) ] || \
623 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
624 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
625 $(INSTALL_PROGRAM) libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)
626 ln -sf libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.sl
627 install-shared-shareda: libpcap.shareda
629 # AIX shared libraries are weird. They're archive libraries
630 # with one or more shared object components.
632 [ -d $(DESTDIR)$(libdir) ] || \
633 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
634 $(INSTALL_PROGRAM) libpcap.shareda $(DESTDIR)$(libdir)/libpcap.a
637 install-archive: install-archive-$(DYEXT)
638 install-archive-so install-archive-dylib install-archive-sl install-archive-none: libpcap.a
640 # Most platforms have separate suffixes for shared and
641 # archive libraries, so we install both.
643 [ -d $(DESTDIR)$(libdir) ] || \
644 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
645 $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
646 $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
647 install-archive-shareda:
649 # AIX, however, doesn't, so we don't install the archive
653 uninstall: uninstall-shared
654 rm -f $(DESTDIR)$(libdir)/libpcap.a
655 for i in $(PUBHDR); do \
656 rm -f $(DESTDIR)$(includedir)/$$i; done
657 -rmdir $(DESTDIR)$(includedir)/pcap
658 rm -f $(DESTDIR)/$(bindir)/pcap-config
659 for i in $(MAN1); do \
660 rm -f $(DESTDIR)$(mandir)/man1/$$i; done
661 for i in $(MAN3PCAP); do \
662 rm -f $(DESTDIR)$(mandir)/man3/$$i; done
663 rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
664 rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
665 rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
666 rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
667 rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
668 rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
669 rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
670 rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
671 rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
672 rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
673 rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
674 rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
675 for i in $(MANFILE); do \
676 rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
677 for i in $(MANMISC); do \
678 rm -f $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
680 uninstall-shared: uninstall-shared-$(DYEXT)
682 VER=`cat $(srcdir)/VERSION`; \
683 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
684 rm -f $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
685 rm -f $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
686 rm -f $(DESTDIR)$(libdir)/libpcap.so
687 uninstall-shared-dylib:
688 VER=`cat $(srcdir)/VERSION`; \
690 rm -f $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
691 rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
692 rm -f $(DESTDIR)$(libdir)/libpcap.dylib
694 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
695 rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER; \
696 rm -f $(DESTDIR)$(libdir)/libpcap.sl
697 uninstall-shared-shareda:
698 rm -f $(DESTDIR)$(libdir)/libpcap.a
699 uninstall-shared-none:
705 rm -f Makefile config.cache config.log config.status \
706 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
708 rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=)
709 rm -rf autom4te.cache
712 ctags -wtd $(TAGFILES)
714 packaging/pcap.spec: packaging/pcap.spec.in VERSION
715 RPMVERSION=`cat VERSION | sed s/-.*//g`; \
716 sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@
719 @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
721 tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \
722 $(MAN3PCAP_NOEXPAND) $(MANFILE) $(MANMISC) $(EXTRA_DIST) | \
723 (cd $$name; tar xf -); \
724 tar -c -z -f $$name.tar.gz $$name; \
727 depend: $(GENSRC) $(GENHDR) bpf_filter.c
728 ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
730 Makefile: Makefile.in config.status
732 @echo your Makefile was out of date, now run $(MAKE) again