]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/libpcap/Makefile.in
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / libpcap / Makefile.in
1 #  Copyright (c) 1993, 1994, 1995, 1996
2 #       The Regents of the University of California.  All rights reserved.
3 #
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
15 #  written permission.
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.
19 #
20 # @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.108.2.28 2008-10-23 22:13:21 guy Exp $ (LBL)
21
22 #
23 # Various configurable paths (remember to edit Makefile.in, not Makefile)
24 #
25
26 # Top level hierarchy
27 prefix = @prefix@
28 exec_prefix = @exec_prefix@
29 datarootdir = @datarootdir@
30 # Pathname of directory to install the configure program
31 bindir = @bindir@
32 # Pathname of directory to install the include files
33 includedir = @includedir@
34 # Pathname of directory to install the library
35 libdir =  @libdir@
36 # Pathname of directory to install the man pages
37 mandir = @mandir@
38
39 # VPATH
40 srcdir = @srcdir@
41 VPATH = @srcdir@
42
43 #
44 # You shouldn't need to edit anything below.
45 #
46
47 CC = @CC@
48 CCOPT = @V_CCOPT@
49 INCLS = -I. @V_INCLS@
50 DEFS = @DEFS@ @V_DEFS@
51 LIBS = @V_LIBS@
52 DAGLIBS = @DAGLIBS@
53 DEPLIBS = @DEPLIBS@
54 DYEXT = @DYEXT@
55 PROG=libpcap
56
57 # Standard CFLAGS
58 CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
59
60 INSTALL = @INSTALL@
61 INSTALL_PROGRAM = @INSTALL_PROGRAM@
62 INSTALL_DATA = @INSTALL_DATA@
63 RANLIB = @RANLIB@
64
65 #
66 # Flex and bison allow you to specify the prefixes of the global symbols
67 # used by the generated parser.  This allows programs to use lex/yacc
68 # and link against libpcap.  If you don't have flex or bison, get them.
69 #
70 LEX = @V_LEX@
71 YACC = @V_YACC@
72
73 # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
74 # Also, gcc does not remove the .o before forking 'as', which can be a
75 # problem if you don't own the file but can write to the directory.
76 .c.o:
77         @rm -f $@
78         $(CC) $(CFLAGS) -c $(srcdir)/$*.c
79
80 PSRC =  pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@
81 FSRC =  fad-@V_FINDALLDEVS@.c
82 SSRC =  @SSRC@
83 CSRC =  pcap.c inet.c gencode.c optimize.c nametoaddr.c \
84         etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c
85 GENSRC = scanner.c grammar.c version.c
86 LIBOBJS = @LIBOBJS@
87
88 SRC =   $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
89
90 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
91 # hack the extra indirection
92 OBJ =   $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
93 HDR = \
94         acconfig.h \
95         arcnet.h \
96         atmuni31.h \
97         ethertype.h \
98         gencode.h \
99         ieee80211.h \
100         llc.h \
101         nlpid.h \
102         pcap/bluetooth.h \
103         pcap/bpf.h \
104         pcap/namedb.h \
105         pcap/pcap.h \
106         pcap/sll.h \
107         pcap/usb.h \
108         pcap/vlan.h \
109         pcap.h \
110         pcap-int.h \
111         pcap-namedb.h \
112         pcap-stdinc.h \
113         ppp.h \
114         sunatmpos.h
115
116 GENHDR = \
117         scanner.h tokdefs.h version.h
118
119 TAGHDR = \
120         pcap-bpf.h
121
122 TAGFILES = \
123         $(SRC) $(HDR) $(TAGHDR)
124
125 CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
126
127 MAN1 = pcap-config.1
128
129 MAN3PCAP_EXPAND = \
130         pcap.3pcap.in \
131         pcap_compile.3pcap.in \
132         pcap_datalink.3pcap.in \
133         pcap_dump_open.3pcap.in \
134         pcap_list_datalinks.3pcap.in \
135         pcap_open_dead.3pcap.in \
136         pcap_open_offline.3pcap.in
137
138 MAN3PCAP_NOEXPAND = \
139         pcap_activate.3pcap \
140         pcap_breakloop.3pcap \
141         pcap_can_set_rfmon.3pcap \
142         pcap_close.3pcap \
143         pcap_create.3pcap \
144         pcap_datalink_name_to_val.3pcap \
145         pcap_datalink_val_to_name.3pcap \
146         pcap_dump.3pcap \
147         pcap_dump_close.3pcap \
148         pcap_dump_file.3pcap \
149         pcap_dump_flush.3pcap \
150         pcap_dump_ftell.3pcap \
151         pcap_file.3pcap \
152         pcap_fileno.3pcap \
153         pcap_findalldevs.3pcap \
154         pcap_freealldevs.3pcap \
155         pcap_freecode.3pcap \
156         pcap_free_datalinks.3pcap \
157         pcap_get_selectable_fd.3pcap \
158         pcap_geterr.3pcap \
159         pcap_inject.3pcap \
160         pcap_is_swapped.3pcap \
161         pcap_lib_version.3pcap \
162         pcap_lookupdev.3pcap \
163         pcap_lookupnet.3pcap \
164         pcap_loop.3pcap \
165         pcap_major_version.3pcap \
166         pcap_next_ex.3pcap \
167         pcap_offline_filter.3pcap \
168         pcap_open_live.3pcap \
169         pcap_set_buffer_size.3pcap \
170         pcap_set_datalink.3pcap \
171         pcap_set_promisc.3pcap \
172         pcap_set_rfmon.3pcap \
173         pcap_set_snaplen.3pcap \
174         pcap_set_timeout.3pcap \
175         pcap_setdirection.3pcap \
176         pcap_setfilter.3pcap \
177         pcap_setnonblock.3pcap \
178         pcap_snapshot.3pcap \
179         pcap_stats.3pcap \
180         pcap_statustostr.3pcap \
181         pcap_strerror.3pcap
182
183 MAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=)
184
185 MANFILE = \
186         pcap-savefile.manfile.in
187
188 MANMISC = \
189         pcap-filter.manmisc.in \
190         pcap-linktype.manmisc.in
191
192 EXTRA_DIST = \
193         CHANGES \
194         ChmodBPF/ChmodBPF \
195         ChmodBPF/StartupParameters.plist \
196         CREDITS \
197         INSTALL.txt \
198         LICENSE \
199         Makefile.in \
200         README \
201         README.aix \
202         README.dag \
203         README.hpux \
204         README.linux \
205         README.macosx \
206         README.septel \
207         README.sita \
208         README.tru64 \
209         README.Win32 \
210         SUNOS4/nit_if.o.sparc \
211         SUNOS4/nit_if.o.sun3 \
212         SUNOS4/nit_if.o.sun4c.4.0.3c \
213         TODO \
214         VERSION \
215         aclocal.m4 \
216         bpf/net/bpf_filter.c \
217         chmod_bpf \
218         config.guess \
219         config.h.in \
220         config.sub \
221         configure \
222         configure.in \
223         dlpisubs.c \
224         dlpisubs.h \
225         fad-getad.c \
226         fad-gifc.c \
227         fad-glifc.c \
228         fad-null.c \
229         fad-sita.c \
230         fad-win32.c \
231         filtertest.c \
232         findalldevstest.c \
233         grammar.y \
234         install-sh \
235         lbl/os-aix4.h \
236         lbl/os-hpux11.h \
237         lbl/os-osf4.h \
238         lbl/os-osf5.h \
239         lbl/os-solaris2.h \
240         lbl/os-sunos4.h \
241         lbl/os-ultrix4.h \
242         missing/snprintf.c \
243         mkdep \
244         msdos/bin2c.c \
245         msdos/common.dj \
246         msdos/makefile \
247         msdos/makefile.dj \
248         msdos/makefile.wc \
249         msdos/ndis2.c \
250         msdos/ndis2.h \
251         msdos/ndis_0.asm \
252         msdos/pkt_rx0.asm \
253         msdos/pkt_rx1.s \
254         msdos/pktdrvr.c \
255         msdos/pktdrvr.h \
256         msdos/readme.dos \
257         net/bpf_filter.c \
258         org.tcpdump.chmod_bpf.plist \
259         packaging/pcap.spec.in \
260         pcap-bpf.c \
261         pcap-bpf.h \
262         pcap-bt-linux.c \
263         pcap-bt-linux.h \
264         pcap-config.in \
265         pcap-dag.c \
266         pcap-dag.h \
267         pcap-dlpi.c \
268         pcap-dos.c \
269         pcap-dos.h \
270         pcap-enet.c \
271         pcap-int.h \
272         pcap-libdlpi.c \
273         pcap-linux.c \
274         pcap-namedb.h \
275         pcap-nit.c \
276         pcap-null.c \
277         pcap-pf.c \
278         pcap-septel.c \
279         pcap-septel.h \
280         pcap-sita.h \
281         pcap-sita.c \
282         pcap-sita.html \
283         pcap-snit.c \
284         pcap-snoop.c \
285         pcap-usb-linux.c \
286         pcap-usb-linux.h \
287         pcap-win32.c \
288         runlex.sh \
289         scanner.l \
290         Win32/Include/Gnuc.h \
291         Win32/Include/addrinfo.h \
292         Win32/Include/bittypes.h \
293         Win32/Include/cdecl_ext.h \
294         Win32/Include/inetprivate.h \
295         Win32/Include/ip6_misc.h \
296         Win32/Include/sockstorage.h \
297         Win32/Include/arpa/nameser.h \
298         Win32/Include/net/if.h \
299         Win32/Include/net/netdb.h \
300         Win32/Include/net/paths.h \
301         Win32/Prj/libpcap.dsp \
302         Win32/Prj/libpcap.dsw \
303         Win32/Src/ffs.c \
304         Win32/Src/gai_strerror.c \
305         Win32/Src/getaddrinfo.c \
306         Win32/Src/getnetbynm.c \
307         Win32/Src/getnetent.c \
308         Win32/Src/getopt.c \
309         Win32/Src/getservent.c \
310         Win32/Src/inet_aton.c \
311         Win32/Src/inet_net.c \
312         Win32/Src/inet_pton.c
313
314 all: libpcap.a pcap-config
315
316 libpcap.a: $(OBJ)
317         @rm -f $@
318         $(AR) rc $@ $(OBJ) $(LIBS)
319         $(RANLIB) $@
320
321 shared: libpcap.$(DYEXT)
322
323 #
324 # XXX - this works with GNU ld, but won't necessarily work with native
325 # ld on, for example, various SVR4-flavored platforms, or Digital UNIX.
326 #
327 libpcap.so: $(OBJ)
328         @rm -f $@
329         $(CC) -shared -Wl,-soname,$@.1 -o $@.`cat $(srcdir)/VERSION` $(OBJ) $(DAGLIBS)
330
331 #
332 # The following rule succeeds, but the result is untested.
333 #
334 # XXX - OS X installs the library as "libpcap.A.dylib", with that as the
335 # install_name, and sets the current version to 1 as well.  VERSION
336 # might contain a not-purely-numeric version number, but
337 # -current_version requires a purely numeric version, so this won't
338 # work with top-of-tree builds.
339 #
340 libpcap.dylib: $(OBJ)
341         rm -f libpcap*.dylib
342         $(CC) -dynamiclib -undefined error -o libpcap.`cat $(srcdir)/VERSION`.dylib $(OBJ) \
343                 -install_name $(libdir)/libpcap.A.dylib \
344                 -compatibility_version 1 \
345                 -current_version `sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`
346
347 scanner.c: $(srcdir)/scanner.l
348         @rm -f $@
349         ./runlex.sh $(LEX) -o$@ $<
350
351 scanner.o: scanner.c tokdefs.h
352         $(CC) $(CFLAGS) -c scanner.c
353
354 pcap.o: version.h
355
356 tokdefs.h: grammar.c
357 grammar.c: $(srcdir)/grammar.y
358         @rm -f grammar.c tokdefs.h
359         $(YACC) -d $<
360         mv y.tab.c grammar.c
361         mv y.tab.h tokdefs.h
362
363 grammar.o: grammar.c
364         @rm -f $@
365         $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
366
367 version.o: version.c
368         $(CC) $(CFLAGS) -c version.c
369
370 snprintf.o: $(srcdir)/missing/snprintf.c
371         $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
372
373 version.c: $(srcdir)/VERSION
374         @rm -f $@
375         sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@
376
377 #
378 # NOTE: this really is supposed to be static; importing a string
379 # from a shared library does not work very well on many
380 # versions of UNIX (Solaris, Linux, and the BSDs, for example),
381 # so we make the version string static and return it from
382 # a function, which does work.
383 #
384 version.h: $(srcdir)/VERSION
385         @rm -f $@
386         sed -e 's/.*/static const char pcap_version_string[] = "libpcap version &";/' $(srcdir)/VERSION > $@
387
388 bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
389         rm -f bpf_filter.c
390         ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c
391
392 bpf_filter.o: bpf_filter.c
393         $(CC) $(CFLAGS) -c bpf_filter.c
394
395 #
396 # Generate the pcap-config script.
397 #
398 pcap-config: pcap-config.in Makefile
399         @rm -f $@ $@.tmp
400         sed -e 's|@includedir[@]|$(includedir)|g' \
401             -e 's|@libdir[@]|$(libdir)|g' \
402             -e 's|@DEPLIBS[@]|$(DEPLIBS)|g' \
403             pcap-config.in >$@.tmp
404         mv $@.tmp $@
405         chmod a+x $@
406
407 #
408 # Test programs - not built by default, and not installed.
409 #
410 filtertest: filtertest.c libpcap.a
411         $(CC) $(CFLAGS) -I. -L. -o filtertest filtertest.c libpcap.a
412
413 findalldevstest: findalldevstest.c libpcap.a
414         $(CC) $(CFLAGS) -I. -L. -o findalldevstest findalldevstest.c libpcap.a
415
416 install: libpcap.a pcap-config
417         [ -d $(DESTDIR)$(libdir) ] || \
418             (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
419         $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
420         $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
421         [ -d $(DESTDIR)$(includedir) ] || \
422             (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
423         [ -d $(DESTDIR)$(includedir)/pcap ] || \
424             (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
425         [ -d $(DESTDIR)$(mandir)/man1 ] || \
426             (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
427         [ -d $(DESTDIR)$(mandir)/man3 ] || \
428             (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3)
429         [ -d $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@ ] || \
430             (mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
431         [ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
432             (mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
433         $(INSTALL_DATA) $(srcdir)/pcap/pcap.h \
434             $(DESTDIR)$(includedir)/pcap/pcap.h
435         $(INSTALL_DATA) $(srcdir)/pcap/bpf.h \
436             $(DESTDIR)$(includedir)/pcap/bpf.h
437         $(INSTALL_DATA) $(srcdir)/pcap/namedb.h \
438             $(DESTDIR)$(includedir)/pcap/namedb.h
439         $(INSTALL_DATA) $(srcdir)/pcap/sll.h \
440             $(DESTDIR)$(includedir)/pcap/sll.h
441         $(INSTALL_DATA) $(srcdir)/pcap/usb.h \
442             $(DESTDIR)$(includedir)/pcap/usb.h
443         $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h
444         $(INSTALL_DATA) $(srcdir)/pcap-bpf.h \
445             $(DESTDIR)$(includedir)/pcap-bpf.h
446         $(INSTALL_DATA) $(srcdir)/pcap-namedb.h \
447             $(DESTDIR)$(includedir)/pcap-namedb.h
448         $(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config
449         for i in $(MAN1); do \
450                 $(INSTALL_DATA) $(srcdir)/$$i \
451                     $(DESTDIR)$(mandir)/man1/$$i; done
452         for i in $(MAN3PCAP); do \
453                 $(INSTALL_DATA) $(srcdir)/$$i \
454                     $(DESTDIR)$(mandir)/man3/$$i; done
455         ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \
456                  $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
457         ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \
458                  $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
459         ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \
460                  $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
461         ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \
462                  $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
463         ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \
464                  $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
465         ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \
466                  $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
467         ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \
468                  $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
469         ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \
470                  $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
471         ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \
472                  $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
473         for i in $(MANFILE); do \
474                 $(INSTALL_DATA) $(srcdir)/`echo $$i | sed 's/.manfile.in/.manfile/'` \
475                     $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
476         for i in $(MANMISC); do \
477                 $(INSTALL_DATA) $(srcdir)/`echo $$i | sed 's/.manmisc.in/.manmisc/'` \
478                     $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
479
480 install-shared: install-shared-$(DYEXT)
481 install-shared-so: libpcap.so
482         $(INSTALL_PROGRAM) libpcap.so.`cat VERSION` $(DESTDIR)$(libdir)/libpcap.so.`cat VERSION`
483 install-shared-dylib: libpcap.dylib
484         $(INSTALL_PROGRAM) libpcap.`cat VERSION`.dylib $(DESTDIR)$(libdir)/libpcap.`cat VERSION`.dylib
485         VER=`cat VERSION`; cd $(DESTDIR)$(libdir) && ln -sf libpcap.$$VER.dylib libpcap.A.dylib;  ln -sf libpcap.A.dylib libpcap.dylib
486
487 uninstall:
488         rm -f $(DESTDIR)$(libdir)/libpcap.a
489         rm -f $(DESTDIR)$(includedir)/pcap/pcap.h
490         rm -f $(DESTDIR)$(includedir)/pcap/bpf.h
491         rm -f $(DESTDIR)$(includedir)/pcap/namedb.h
492         rm -f $(DESTDIR)$(includedir)/pcap/sll.h
493         rm -f $(DESTDIR)$(includedir)/pcap/usb.h
494         -rmdir $(DESTDIR)$(includedir)/pcap
495         rm -f $(DESTDIR)$(includedir)/pcap.h
496         rm -f $(DESTDIR)$(includedir)/pcap-bpf.h
497         rm -f $(DESTDIR)$(includedir)/pcap-namedb.h
498         for i in $(MAN1); do \
499                 rm -f $(DESTDIR)$(mandir)/man1/$$i; done
500         for i in $(MAN3PCAP); do \
501                 rm -f $(DESTDIR)$(mandir)/man3/$$i; done
502         rm -f  $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap
503         rm -f  $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap
504         rm -f  $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap
505         rm -f  $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap
506         rm -f  $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap
507         rm -f  $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap
508         rm -f  $(DESTDIR)$(mandir)/man3/pcap_next.3pcap
509         rm -f  $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
510         rm -f  $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
511         for i in $(MANFILE); do \
512                 rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
513         for i in $(MANMISC); do \
514                 rm -f $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
515
516 clean:
517         rm -f $(CLEANFILES) libpcap*.dylib libpcap.so*
518
519 distclean: clean
520         rm -f Makefile config.cache config.log config.status \
521             config.h gnuc.h os-proto.h bpf_filter.c pcap-config \
522             stamp-h stamp-h.in
523         rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=)
524         rm -rf autom4te.cache
525
526 tags: $(TAGFILES)
527         ctags -wtd $(TAGFILES)
528
529 packaging/pcap.spec: packaging/pcap.spec.in VERSION
530         RPMVERSION=`cat VERSION | sed s/-.*//g`; \
531                 sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $<   > $@
532
533 releasetar:
534         @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
535            mkdir $$name; \
536            tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \
537               $(MAN3PCAP_NOEXPAND) $(MANFILE) $(MANMISC) $(EXTRA_DIST) | \
538               (cd $$name; tar xf -); \
539            tar -c -z -f $$name.tar.gz $$name; \
540            rm -rf $$name
541
542 depend: $(GENSRC) $(GENHDR) bpf_filter.c
543         ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
544
545 Makefile: Makefile.in config.status
546         ./config.status
547         @echo your Makefile was out of date, now run $(MAKE) again
548         exit 1