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.
51 DEFS = @DEFS@ @V_DEFS@
53 ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@
57 V_RPATH_OPT = @V_RPATH_OPT@
61 CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
64 INSTALL_PROGRAM = @INSTALL_PROGRAM@
65 INSTALL_DATA = @INSTALL_DATA@
69 # Flex and bison allow you to specify the prefixes of the global symbols
70 # used by the generated parser. This allows programs to use lex/yacc
71 # and link against libpcap. If you don't have flex or bison, get them.
76 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
77 # Also, gcc does not remove the .o before forking 'as', which can be a
78 # problem if you don't own the file but can write to the directory.
81 $(CC) $(CFLAGS) -c $(srcdir)/$*.c
83 PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@
84 FSRC = fad-@V_FINDALLDEVS@.c
86 CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
87 savefile.c sf-pcap.c sf-pcap-ng.c pcap-common.c \
88 bpf_image.c bpf_dump.c
89 GENSRC = scanner.c grammar.c bpf_filter.c version.c
92 SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
94 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
95 # hack the extra indirection
96 OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
127 scanner.h tokdefs.h version.h
132 CLEANFILES = $(OBJ) libpcap.* filtertest findalldevstest selpolltest \
133 opentest $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
140 pcap_compile.3pcap.in \
141 pcap_datalink.3pcap.in \
142 pcap_dump_open.3pcap.in \
143 pcap_list_datalinks.3pcap.in \
144 pcap_open_dead.3pcap.in \
145 pcap_open_offline.3pcap.in
147 MAN3PCAP_NOEXPAND = \
148 pcap_activate.3pcap \
149 pcap_breakloop.3pcap \
150 pcap_can_set_rfmon.3pcap \
153 pcap_datalink_name_to_val.3pcap \
154 pcap_datalink_val_to_name.3pcap \
156 pcap_dump_close.3pcap \
157 pcap_dump_file.3pcap \
158 pcap_dump_flush.3pcap \
159 pcap_dump_ftell.3pcap \
162 pcap_findalldevs.3pcap \
163 pcap_freealldevs.3pcap \
164 pcap_freecode.3pcap \
165 pcap_free_datalinks.3pcap \
166 pcap_get_selectable_fd.3pcap \
169 pcap_is_swapped.3pcap \
170 pcap_lib_version.3pcap \
171 pcap_lookupdev.3pcap \
172 pcap_lookupnet.3pcap \
174 pcap_major_version.3pcap \
176 pcap_offline_filter.3pcap \
177 pcap_open_live.3pcap \
178 pcap_set_buffer_size.3pcap \
179 pcap_set_datalink.3pcap \
180 pcap_set_promisc.3pcap \
181 pcap_set_rfmon.3pcap \
182 pcap_set_snaplen.3pcap \
183 pcap_set_timeout.3pcap \
184 pcap_setdirection.3pcap \
185 pcap_setfilter.3pcap \
186 pcap_setnonblock.3pcap \
187 pcap_snapshot.3pcap \
189 pcap_statustostr.3pcap \
192 MAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=)
195 pcap-savefile.manfile.in
198 pcap-filter.manmisc.in \
199 pcap-linktype.manmisc.in
204 ChmodBPF/StartupParameters.plist \
219 SUNOS4/nit_if.o.sparc \
220 SUNOS4/nit_if.o.sun3 \
221 SUNOS4/nit_if.o.sun4c.4.0.3c \
225 bpf/net/bpf_filter.c \
267 org.tcpdump.chmod_bpf.plist \
268 packaging/pcap.spec.in \
303 Win32/Include/Gnuc.h \
304 Win32/Include/addrinfo.h \
305 Win32/Include/bittypes.h \
306 Win32/Include/cdecl_ext.h \
307 Win32/Include/inetprivate.h \
308 Win32/Include/ip6_misc.h \
309 Win32/Include/sockstorage.h \
310 Win32/Include/arpa/nameser.h \
311 Win32/Include/net/if.h \
312 Win32/Include/net/netdb.h \
313 Win32/Include/net/paths.h \
314 Win32/Prj/libpcap.dsp \
315 Win32/Prj/libpcap.dsw \
317 Win32/Src/gai_strerror.c \
318 Win32/Src/getaddrinfo.c \
319 Win32/Src/getnetbynm.c \
320 Win32/Src/getnetent.c \
322 Win32/Src/getservent.c \
323 Win32/Src/inet_aton.c \
324 Win32/Src/inet_net.c \
325 Win32/Src/inet_pton.c
327 all: libpcap.a shared pcap-config
331 ar rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
334 shared: libpcap.$(DYEXT)
338 VER=`cat $(srcdir)/VERSION`; \
339 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
340 @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \
341 -o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS)
344 # The following rule succeeds, but the result is untested.
346 # In Mac OS X, the libpcap dylib has the name "libpcap.A.dylib", with
347 # its full path as the install_name, and with the compatibility and
348 # current version both set to 1. The compatibility version is set to
349 # 1 so that programs built with a newer version of the library will run
350 # against older versions; multi-platform software probably will fail if
351 # it uses APIs added in the newer version, but Mac OS X-specific software
352 # will use weak linking and check at run time whether those APIs are
355 # We also use "A" as the major version, and 1 as the compatibility version,
356 # but set the current version to the value in VERSION, with any non-numeric
357 # stuff stripped off (the compatibility and current version must be of the
358 # form X[.Y[.Z]], with Y and Z possibly absent, and with all components
361 libpcap.dylib: $(OBJ)
363 VER=`cat $(srcdir)/VERSION`; \
366 CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \
367 $(CC) -dynamiclib -undefined error $(LDFLAGS) \
368 -o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJS) $(LIBS) \
369 -install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \
370 -compatibility_version $$COMPAT_VER \
371 -current_version $$CURRENT_VER
374 # The HP-UX linker manual says that the convention for a versioned library
375 # is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case
376 # on at least one HP-UX 11.00 system; libXXX.sl is a symlink to
379 # The manual also says "library-level versioning" (think "sonames") was
380 # added in HP-UX 10.0.
382 # XXX - this assumes we're using the HP linker, rather than the GNU
383 # linker, even with GCC.
386 @MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
387 rm -f libpcap.$$MAJOR_VER
388 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
389 ld -b $(LDFLAGS) -o libpcap.$$MAJOR_VER +h libpcap.$$MAJOR_VER \
390 $(OBJ) $(ADDLOBJS) $(LIBS)
393 # AIX is different from everybody else. A shared library is an archive
394 # library with one or more shared-object components. We still build a
395 # normal static archive library on AIX, for the benefit of the traditional
396 # scheme of building libpcap and tcpdump in subdirectories of the
397 # same directory, with tcpdump statically linked with the libpcap
398 # in question, but we also build a shared library as "libpcap.shareda"
399 # and install *it*, rather than the static library, as "libpcap.a".
401 libpcap.shareda: $(OBJ)
403 $(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS)
407 # For platforms that don't support shared libraries (or on which we
408 # don't support shared libraries).
412 scanner.c: $(srcdir)/scanner.l
414 $(srcdir)/runlex.sh $(LEX) -o$@ $<
416 scanner.o: scanner.c tokdefs.h
417 $(CC) $(CFLAGS) -c scanner.c
422 grammar.c: $(srcdir)/grammar.y
423 @rm -f grammar.c tokdefs.h
430 $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
433 $(CC) $(CFLAGS) -c version.c
435 snprintf.o: $(srcdir)/missing/snprintf.c
436 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
438 version.c: $(srcdir)/VERSION
440 if grep GIT ${srcdir}/VERSION >/dev/null; then \
441 read ver <${srcdir}/VERSION; \
442 echo $$ver | tr -d '\012'; \
445 cat ${srcdir}/VERSION; \
446 fi | sed -e 's/.*/char pcap_version[] = "&";/' > $@
449 # NOTE: this really is supposed to be static; importing a string
450 # from a shared library does not work very well on many
451 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
452 # so we make the version string static and return it from
453 # a function, which does work.
455 version.h: $(srcdir)/VERSION
457 if grep GIT ${srcdir}/VERSION >/dev/null; then \
458 read ver <${srcdir}/VERSION; \
459 echo $$ver | tr -d '\012'; \
462 cat ${srcdir}/VERSION; \
463 fi | sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' > $@
465 bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
467 ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
469 bpf_filter.o: bpf_filter.c
470 $(CC) $(CFLAGS) -c bpf_filter.c
473 # Generate the pcap-config script.
475 pcap-config: $(srcdir)/pcap-config.in
477 sed -e 's|@includedir[@]|$(includedir)|g' \
478 -e 's|@libdir[@]|$(libdir)|g' \
479 -e 's|@LIBS[@]|$(LIBS)|g' \
480 -e 's|@V_RPATH_OPT[@]|$(V_RPATH_OPT)|g' \
481 $(srcdir)/pcap-config.in >$@.tmp
486 # Test programs - not built by default, and not installed.
488 filtertest: filtertest.c libpcap.a
489 $(CC) $(CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c libpcap.a $(LIBS)
491 findalldevstest: findalldevstest.c libpcap.a
492 $(CC) $(CFLAGS) -I. -L. -o findalldevstest $(srcdir)/findalldevstest.c libpcap.a $(LIBS)
494 selpolltest: selpolltest.c libpcap.a
495 $(CC) $(CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c libpcap.a $(LIBS)
497 opentest: opentest.c libpcap.a
498 $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS)
500 install: install-shared install-archive pcap-config
501 [ -d $(DESTDIR)$(libdir) ] || \
502 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
503 [ -d $(DESTDIR)$(includedir) ] || \
504 (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
505 [ -d $(DESTDIR)$(includedir)/pcap ] || \
506 (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
507 [ -d $(DESTDIR)$(mandir)/man1 ] || \
508 (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
509 [ -d $(DESTDIR)$(mandir)/man3 ] || \
510 (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3)
511 [ -d $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@ ] || \
512 (mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
513 [ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
514 (mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
515 for i in $(PUBHDR); do \
516 $(INSTALL_DATA) $(srcdir)/$$i \
517 $(DESTDIR)$(includedir)/$$i; done
518 [ -d $(DESTDIR)$(bindir) ] || \
519 (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir))
520 $(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
521 for i in $(MAN1); do \
522 $(INSTALL_DATA) $(srcdir)/$$i \
523 $(DESTDIR)$(mandir)/man1/$$i; done
524 for i in $(MAN3PCAP_NOEXPAND); do \
525 $(INSTALL_DATA) $(srcdir)/$$i \
526 $(DESTDIR)$(mandir)/man3/$$i; done
527 for i in $(MAN3PCAP_EXPAND:.in=); do \
528 $(INSTALL_DATA) $$i \
529 $(DESTDIR)$(mandir)/man3/$$i; done
530 rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
531 ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
532 $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
533 rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
534 ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
535 $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
536 rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
537 ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
538 $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
539 rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
540 ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
541 $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
542 rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
543 ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
544 $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
545 rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
546 ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
547 $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
548 rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
549 ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
550 $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
551 rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
552 ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
553 $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
554 rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
555 ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
556 $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
557 for i in $(MANFILE); do \
558 $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
559 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
560 for i in $(MANMISC); do \
561 $(INSTALL_DATA) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \
562 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
564 install-shared: install-shared-$(DYEXT)
565 install-shared-so: libpcap.so
566 [ -d $(DESTDIR)$(libdir) ] || \
567 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
568 VER=`cat $(srcdir)/VERSION`; \
569 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
570 $(INSTALL_PROGRAM) libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
571 ln -sf libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
572 ln -sf libpcap.so.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.so
573 install-shared-dylib: libpcap.dylib
574 [ -d $(DESTDIR)$(libdir) ] || \
575 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
576 VER=`cat $(srcdir)/VERSION`; \
578 $(INSTALL_PROGRAM) libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
579 ln -sf libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
580 ln -sf libpcap.$$MAJOR_VER.dylib $(DESTDIR)$(libdir)/libpcap.dylib
581 install-shared-sl: libpcap.sl
582 [ -d $(DESTDIR)$(libdir) ] || \
583 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
584 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
585 $(INSTALL_PROGRAM) libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)
586 ln -sf libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.sl
587 install-shared-shareda: libpcap.shareda
589 # AIX shared libraries are weird. They're archive libraries
590 # with one or more shared object components.
592 [ -d $(DESTDIR)$(libdir) ] || \
593 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
594 $(INSTALL_PROGRAM) libpcap.shareda $(DESTDIR)$(libdir)/libpcap.a
597 install-archive: install-archive-$(DYEXT)
598 install-archive-so install-archive-dylib install-archive-sl install-archive-none: libpcap.a
600 # Most platforms have separate suffixes for shared and
601 # archive libraries, so we install both.
603 [ -d $(DESTDIR)$(libdir) ] || \
604 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
605 $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
606 $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
607 install-archive-shareda:
609 # AIX, however, doesn't, so we don't install the archive
613 uninstall: uninstall-shared
614 rm -f $(DESTDIR)$(libdir)/libpcap.a
615 for i in $(PUBHDR); do \
616 rm -f $(DESTDIR)$(includedir)/$$i; done
617 -rmdir $(DESTDIR)$(includedir)/pcap
618 rm -f $(DESTDIR)/$(bindir)/pcap-config
619 for i in $(MAN1); do \
620 rm -f $(DESTDIR)$(mandir)/man1/$$i; done
621 for i in $(MAN3PCAP); do \
622 rm -f $(DESTDIR)$(mandir)/man3/$$i; done
623 rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
624 rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
625 rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
626 rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
627 rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
628 rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
629 rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
630 rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
631 rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
632 for i in $(MANFILE); do \
633 rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
634 for i in $(MANMISC); do \
635 rm -f $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
637 uninstall-shared: uninstall-shared-$(DYEXT)
639 VER=`cat $(srcdir)/VERSION`; \
640 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
641 rm -f $(DESTDIR)$(libdir)/libpcap.so.$$VER; \
642 rm -f $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \
643 rm -f $(DESTDIR)$(libdir)/libpcap.so
644 uninstall-shared-dylib:
645 VER=`cat $(srcdir)/VERSION`; \
647 rm -f $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \
648 rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \
649 rm -f $(DESTDIR)$(libdir)/libpcap.dylib
651 MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \
652 rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER; \
653 rm -f $(DESTDIR)$(libdir)/libpcap.sl
654 uninstall-shared-shareda:
655 rm -f $(DESTDIR)$(libdir)/libpcap.a
656 uninstall-shared-none:
662 rm -f Makefile config.cache config.log config.status \
663 config.h gnuc.h os-proto.h bpf_filter.c pcap-config \
665 rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=)
666 rm -rf autom4te.cache
669 ctags -wtd $(TAGFILES)
671 packaging/pcap.spec: packaging/pcap.spec.in VERSION
672 RPMVERSION=`cat VERSION | sed s/-.*//g`; \
673 sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@
676 @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
678 tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \
679 $(MAN3PCAP_NOEXPAND) $(MANFILE) $(MANMISC) $(EXTRA_DIST) | \
680 (cd $$name; tar xf -); \
681 tar -c -z -f $$name.tar.gz $$name; \
684 depend: $(GENSRC) $(GENHDR) bpf_filter.c
685 ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
687 Makefile: Makefile.in config.status
689 @echo your Makefile was out of date, now run $(MAKE) again