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 include files
31 includedir = @includedir@
32 # Pathname of directory to install the library
34 # Pathname of directory to install the man pages
42 # You shouldn't need to edit anything below.
52 DEFS = @DEFS@ @V_DEFS@
54 ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
59 V_RPATH_OPT = @V_RPATH_OPT@
60 DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
64 FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
67 INSTALL_PROGRAM = @INSTALL_PROGRAM@
68 INSTALL_DATA = @INSTALL_DATA@
72 # Flex and bison allow you to specify the prefixes of the global symbols
73 # used by the generated parser. This allows programs to use lex/yacc
74 # and link against libpcap. If you don't have flex or bison, get them.
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@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@
87 FSRC = fad-@V_FINDALLDEVS@.c
89 CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
90 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)
139 tests/capturetest.c \
141 tests/findalldevstest.c \
143 tests/reactivatetest.c \
144 tests/selpolltest.c \
148 scanner.h tokdefs.h version.h
153 CLEANFILES = $(OBJ) libpcap.* $(TESTS) \
154 $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
161 pcap_compile.3pcap.in \
162 pcap_datalink.3pcap.in \
163 pcap_dump_open.3pcap.in \
164 pcap_get_tstamp_precision.3pcap.in \
165 pcap_list_datalinks.3pcap.in \
166 pcap_list_tstamp_types.3pcap.in \
167 pcap_open_dead.3pcap.in \
168 pcap_open_offline.3pcap.in \
169 pcap_set_tstamp_precision.3pcap.in \
170 pcap_set_tstamp_type.3pcap.in
172 MAN3PCAP_NOEXPAND = \
173 pcap_activate.3pcap \
174 pcap_breakloop.3pcap \
175 pcap_can_set_rfmon.3pcap \
178 pcap_datalink_name_to_val.3pcap \
179 pcap_datalink_val_to_name.3pcap \
181 pcap_dump_close.3pcap \
182 pcap_dump_file.3pcap \
183 pcap_dump_flush.3pcap \
184 pcap_dump_ftell.3pcap \
187 pcap_findalldevs.3pcap \
188 pcap_freecode.3pcap \
189 pcap_get_selectable_fd.3pcap \
192 pcap_is_swapped.3pcap \
193 pcap_lib_version.3pcap \
194 pcap_lookupdev.3pcap \
195 pcap_lookupnet.3pcap \
197 pcap_major_version.3pcap \
199 pcap_offline_filter.3pcap \
200 pcap_open_live.3pcap \
201 pcap_set_buffer_size.3pcap \
202 pcap_set_datalink.3pcap \
203 pcap_set_immediate_mode.3pcap \
204 pcap_set_promisc.3pcap \
205 pcap_set_rfmon.3pcap \
206 pcap_set_snaplen.3pcap \
207 pcap_set_timeout.3pcap \
208 pcap_setdirection.3pcap \
209 pcap_setfilter.3pcap \
210 pcap_setnonblock.3pcap \
211 pcap_snapshot.3pcap \
213 pcap_statustostr.3pcap \
214 pcap_strerror.3pcap \
215 pcap_tstamp_type_name_to_val.3pcap \
216 pcap_tstamp_type_val_to_name.3pcap
218 MAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=)
221 pcap-savefile.manfile.in
224 pcap-filter.manmisc.in \
225 pcap-linktype.manmisc.in \
226 pcap-tstamp.manmisc.in
232 ChmodBPF/StartupParameters.plist \
237 Makefile-devel-adds \
248 SUNOS4/nit_if.o.sparc \
249 SUNOS4/nit_if.o.sun3 \
250 SUNOS4/nit_if.o.sun4c.4.0.3c \
254 bpf/net/bpf_filter.c \
293 org.tcpdump.chmod_bpf.plist \
294 packaging/pcap.spec.in \
298 pcap-bt-monitor-linux.c \
299 pcap-bt-monitor-linux.h \
302 pcap-canusb-linux.c \
303 pcap-canusb-linux.h \
317 pcap-netfilter-linux.c \
318 pcap-netfilter-linux.h \
336 Win32/Include/Gnuc.h \
337 Win32/Include/addrinfo.h \
338 Win32/Include/bittypes.h \
339 Win32/Include/cdecl_ext.h \
340 Win32/Include/inetprivate.h \
341 Win32/Include/ip6_misc.h \
342 Win32/Include/sockstorage.h \
343 Win32/Include/arpa/nameser.h \
344 Win32/Include/net/if.h \
345 Win32/Include/net/netdb.h \
346 Win32/Include/net/paths.h \
347 Win32/Prj/libpcap.dsp \
348 Win32/Prj/libpcap.dsw \
350 Win32/Src/gai_strerror.c \
351 Win32/Src/getaddrinfo.c \
352 Win32/Src/getnetbynm.c \
353 Win32/Src/getnetent.c \
355 Win32/Src/getservent.c \
356 Win32/Src/inet_aton.c \
357 Win32/Src/inet_net.c \
358 Win32/Src/inet_pton.c
360 all: libpcap.a shared pcap-config
364 $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
367 shared: libpcap.$(DYEXT)
371 VER=`cat $(srcdir)/VERSION`; \
372 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
373 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \
374 -o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS)
377 # The following rule succeeds, but the result is untested.
379 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
380 # its full path as the install_name, and with the compatibility and
381 # current version both set to 1. The compatibility version is set to
382 # 1 so that programs built with a newer version of the library will run
383 # against older versions; multi-platform software probably will fail if
384 # it uses APIs added in the newer version, but Mac OS X-specific software
385 # will use weak linking and check at run time whether those APIs are
388 # We also use "A" as the major version, and 1 as the compatibility version,
389 # but set the current version to the value in VERSION, with any non-numeric
390 # stuff stripped off (the compatibility and current version must be of the
391 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
394 libpcap.dylib: $(OBJ)
396 VER=`cat $(srcdir)/VERSION`; \
399 CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
400 $(CC) -dynamiclib -undefined error $(LDFLAGS) \
401 -o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJS) $(LIBS) \
402 -install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \
403 -compatibility_version $$COMPAT_VER \
404 -current_version $$CURRENT_VER
407 # The HP-UX linker manual says that the convention for a versioned library
408 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
409 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
412 # The manual also says "library-level versioning" (think "sonames") was
413 # added in HP-UX 10.0.
415 # XXX - this assumes we're using the HP linker, rather than the GNU
416 # linker, even with GCC.
419 @MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
420 rm -f libpcap.$$MAJOR_VER
421 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
422 ld -b $(LDFLAGS) -o libpcap.$$MAJOR_VER +h libpcap.$$MAJOR_VER \
423 $(OBJ) $(ADDLOBJS) $(LIBS)
426 # AIX is different from everybody else. A shared library is an archive
427 # library with one or more shared-object components. We still build a
428 # normal static archive library on AIX, for the benefit of the traditional
429 # scheme of building libpcap and tcpdump in subdirectories of the
430 # same directory, with tcpdump statically linked with the libpcap
431 # in question, but we also build a shared library as "libpcap.shareda"
432 # and install *it*, rather than the static library, as "libpcap.a".
434 libpcap.shareda: $(OBJ)
436 $(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS)
440 # For platforms that don't support shared libraries (or on which we
441 # don't support shared libraries).
445 scanner.c: $(srcdir)/scanner.l
447 $(srcdir)/runlex.sh $(LEX) -o$@ $<
449 scanner.o: scanner.c tokdefs.h
450 $(CC) $(FULL_CFLAGS) -c scanner.c
455 grammar.c: $(srcdir)/grammar.y
456 @rm -f grammar.c tokdefs.h
463 $(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c
466 $(CC) $(FULL_CFLAGS) -c version.c
468 snprintf.o: $(srcdir)/missing/snprintf.c
469 $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
471 version.c: $(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/.*/char pcap_version[] = "&";/' > $@
482 # NOTE: this really is supposed to be static; importing a string
483 # from a shared library does not work very well on many
484 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
485 # so we make the version string static and return it from
486 # a function, which does work.
488 version.h: $(srcdir)/VERSION
490 if grep GIT ${srcdir}/VERSION >/dev/null; then \
491 read ver <${srcdir}/VERSION; \
492 echo $$ver | tr -d '\012'; \
495 cat ${srcdir}/VERSION; \
496 fi | sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
498 bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
500 ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
502 bpf_filter.o: bpf_filter.c
503 $(CC) $(FULL_CFLAGS) -c bpf_filter.c
506 # Generate the pcap-config script.
508 # Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<";
509 # for example, the Solaris 9 make man page says
511 # Because make assigns $< and $* as it would for implicit rules
512 # (according to the suffixes list and the directory contents),
513 # they may be unreliable when used within explicit target entries.
515 # and this is an explicit target entry.
517 # Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in.
519 pcap-config: $(srcdir)/pcap-config.in ./config.status
521 ./config.status --file=$@.tmp:$(srcdir)/pcap-config.in
526 # Test programs - not built by default, and not installed.
530 capturetest: tests/capturetest.c libpcap.a
531 $(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/tests/capturetest.c libpcap.a $(LIBS)
533 filtertest: tests/filtertest.c libpcap.a
534 $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS)
536 findalldevstest: tests/findalldevstest.c libpcap.a
537 $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS)
539 opentest: tests/opentest.c libpcap.a
540 $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS)
542 selpolltest: tests/selpolltest.c libpcap.a
543 $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS)
545 valgrindtest: tests/valgrindtest.c libpcap.a
546 $(CC) $(FULL_CFLAGS) -I. -L. -o valgrindtest $(srcdir)/tests/valgrindtest.c libpcap.a $(LIBS)
548 install: install-shared install-archive pcap-config
549 [ -d $(DESTDIR)$(libdir) ] || \
550 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
551 [ -d $(DESTDIR)$(includedir) ] || \
552 (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
553 [ -d $(DESTDIR)$(includedir)/pcap ] || \
554 (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
555 [ -d $(DESTDIR)$(mandir)/man1 ] || \
556 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
557 [ -d $(DESTDIR)$(mandir)/man3 ] || \
558 (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3)
559 [ -d $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@ ] || \
560 (mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
561 [ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
562 (mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
563 for i in $(PUBHDR); do \
564 $(INSTALL_DATA) $(srcdir)/$$i \
565 $(DESTDIR)$(includedir)/$$i; done
566 [ -d $(DESTDIR)$(bindir) ] || \
567 (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
568 $(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
569 for i in $(MAN1); do \
570 $(INSTALL_DATA) $(srcdir)/$$i \
571 $(DESTDIR)$(mandir)/man1/$$i; done
572 for i in $(MAN3PCAP_NOEXPAND); do \
573 $(INSTALL_DATA) $(srcdir)/$$i \
574 $(DESTDIR)$(mandir)/man3/$$i; done
575 for i in $(MAN3PCAP_EXPAND:.in=); do \
576 $(INSTALL_DATA) $$i \
577 $(DESTDIR)$(mandir)/man3/$$i; done
578 (cd $(DESTDIR)$(mandir)/man3 && \
579 rm -f pcap_datalink_val_to_description.3pcap && \
580 $(LN_S) pcap_datalink_val_to_name.3pcap \
581 pcap_datalink_val_to_description.3pcap && \
582 rm -f pcap_dump_fopen.3pcap && \
583 $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \
584 rm -f pcap_freealldevs.3pcap && \
585 $(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \
586 rm -f pcap_perror.3pcap && \
587 $(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \
588 rm -f pcap_sendpacket.3pcap && \
589 $(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \
590 rm -f pcap_free_datalinks.3pcap && \
591 $(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \
592 rm -f pcap_free_tstamp_types.3pcap && \
593 $(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \
594 rm -f pcap_dispatch.3pcap && \
595 $(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \
596 rm -f pcap_minor_version.3pcap && \
597 $(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \
598 rm -f pcap_next.3pcap && \
599 $(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \
600 rm -f pcap_open_dead_with_tstamp_precision.3pcap && \
601 $(LN_S) pcap_open_dead.3pcap \
602 pcap_open_dead_with_tstamp_precision.3pcap && \
603 rm -f pcap_open_offline_with_tstamp_precision.3pcap && \
604 $(LN_S) pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \
605 rm -f pcap_fopen_offline.3pcap && \
606 $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
607 rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
608 $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
609 rm -f pcap_tstamp_type_val_to_description.3pcap && \
610 $(LN_S) pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \
611 rm -f pcap_getnonblock.3pcap && \
612 $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
613 for i in $(MANFILE); do \
614 $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
615 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
616 for i in $(MANMISC); do \
617 $(INSTALL_DATA) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
618 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
620 install-shared: install-shared-$(DYEXT)
621 install-shared-so: libpcap.so
622 [ -d $(DESTDIR)$(libdir) ] || \
623 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
624 VER=`cat $(srcdir)/VERSION`; \
625 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
626 $(INSTALL_PROGRAM) libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
627 ln -sf libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
628 ln -sf libpcap.so.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.so
629 install-shared-dylib: libpcap.dylib
630 [ -d $(DESTDIR)$(libdir) ] || \
631 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
632 VER=`cat $(srcdir)/VERSION`; \
634 $(INSTALL_PROGRAM) libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
635 ln -sf libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
636 ln -sf libpcap.$$MAJOR_VER.dylib $(DESTDIR)$(libdir)/libpcap.dylib
637 install-shared-sl: libpcap.sl
638 [ -d $(DESTDIR)$(libdir) ] || \
639 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
640 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
641 $(INSTALL_PROGRAM) libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)
642 ln -sf libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.sl
643 install-shared-shareda: libpcap.shareda
645 # AIX shared libraries are weird. They're archive libraries
646 # with one or more shared object components.
648 [ -d $(DESTDIR)$(libdir) ] || \
649 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
650 $(INSTALL_PROGRAM) libpcap.shareda $(DESTDIR)$(libdir)/libpcap.a
653 install-archive: install-archive-$(DYEXT)
654 install-archive-so install-archive-dylib install-archive-sl install-archive-none: libpcap.a
656 # Most platforms have separate suffixes for shared and
657 # archive libraries, so we install both.
659 [ -d $(DESTDIR)$(libdir) ] || \
660 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
661 $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
662 $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
663 install-archive-shareda:
665 # AIX, however, doesn't, so we don't install the archive
669 uninstall: uninstall-shared
670 rm -f $(DESTDIR)$(libdir)/libpcap.a
671 for i in $(PUBHDR); do \
672 rm -f $(DESTDIR)$(includedir)/$$i; done
673 -rmdir $(DESTDIR)$(includedir)/pcap
674 rm -f $(DESTDIR)/$(bindir)/pcap-config
675 for i in $(MAN1); do \
676 rm -f $(DESTDIR)$(mandir)/man1/$$i; done
677 for i in $(MAN3PCAP); do \
678 rm -f $(DESTDIR)$(mandir)/man3/$$i; done
679 rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
680 rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
681 rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap
682 rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
683 rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
684 rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap
685 rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap
686 rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
687 rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
688 rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
689 rm -f $(DESTDIR)$(mandir)/man3/pcap_open_dead_with_tstamp_precision.3pcap
690 rm -f $(DESTDIR)$(mandir)/man3/pcap_open_offline_with_tstamp_precision.3pcap
691 rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
692 rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline_with_tstamp_precision.3pcap
693 rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
694 rm -f $(DESTDIR)$(mandir)/man3/pcap_tstamp_type_val_to_description.3pcap
695 for i in $(MANFILE); do \
696 rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
697 for i in $(MANMISC); do \
698 rm -f $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
700 uninstall-shared: uninstall-shared-$(DYEXT)
702 VER=`cat $(srcdir)/VERSION`; \
703 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
704 rm -f $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
705 rm -f $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
706 rm -f $(DESTDIR)$(libdir)/libpcap.so
707 uninstall-shared-dylib:
708 VER=`cat $(srcdir)/VERSION`; \
710 rm -f $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
711 rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
712 rm -f $(DESTDIR)$(libdir)/libpcap.dylib
714 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
715 rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER; \
716 rm -f $(DESTDIR)$(libdir)/libpcap.sl
717 uninstall-shared-shareda:
718 rm -f $(DESTDIR)$(libdir)/libpcap.a
719 uninstall-shared-none:
725 rm -f Makefile config.cache config.log config.status \
726 config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \
728 rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=)
729 rm -rf autom4te.cache
732 ctags -wtd $(TAGFILES)
734 packaging/pcap.spec: packaging/pcap.spec.in VERSION
735 RPMVERSION=`cat VERSION | sed s/-.*//g`; \
736 sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@
739 @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
741 tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \
742 $(MAN3PCAP_NOEXPAND) $(MANFILE) $(MANMISC) $(EXTRA_DIST) | \
743 (cd $$name; tar xf -); \
744 tar -c -z -f $$name.tar.gz $$name; \
747 depend: $(GENSRC) $(GENHDR) bpf_filter.c
748 $(MKDEP) -c $(CC) -m $(CFLAGS) $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)