Makefile.in revision 75107
117683Spst# Copyright (c) 1993, 1994, 1995, 1996 217683Spst# The Regents of the University of California. All rights reserved. 317683Spst# 417683Spst# Redistribution and use in source and binary forms, with or without 517683Spst# modification, are permitted provided that: (1) source code distributions 617683Spst# retain the above copyright notice and this paragraph in its entirety, (2) 717683Spst# distributions including binary code include the above copyright notice and 817683Spst# this paragraph in its entirety in the documentation or other materials 917683Spst# provided with the distribution, and (3) all advertising materials mentioning 1017683Spst# features or use of this software display the following acknowledgement: 1117683Spst# ``This product includes software developed by the University of California, 1217683Spst# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 1317683Spst# the University nor the names of its contributors may be used to endorse 1417683Spst# or promote products derived from this software without specific prior 1517683Spst# written permission. 1617683Spst# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 1717683Spst# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 1817683Spst# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1917683Spst# 2075107Sfenner# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.87.2.1 2001/01/18 04:06:24 guy Exp $ (LBL) 2117683Spst 2217683Spst# 2317683Spst# Various configurable paths (remember to edit Makefile.in, not Makefile) 2417683Spst# 2517683Spst 2617683Spst# Top level hierarchy 2717683Spstprefix = @prefix@ 2817683Spstexec_prefix = @exec_prefix@ 2917683Spst# Pathname of directory to install the include files 3075107Sfennerincludedir = @includedir@ 3117683Spst# Pathname of directory to install the library 3275107Sfennerlibdir = @libdir@ 3317683Spst# Pathname of directory to install the man page 3475107Sfennermandir = @mandir@ 3517683Spst 3626175Sfenner# VPATH 3726175Sfennersrcdir = @srcdir@ 3826175SfennerVPATH = @srcdir@ 3926175Sfenner 4017683Spst# 4117683Spst# You shouldn't need to edit anything below. 4217683Spst# 4317683Spst 4417683SpstCC = @CC@ 4517683SpstCCOPT = @V_CCOPT@ 4617683SpstINCLS = -I. @V_INCLS@ 4717683SpstDEFS = @DEFS@ 4817683Spst 4917683Spst# Standard CFLAGS 5017683SpstCFLAGS = $(CCOPT) $(INCLS) $(DEFS) 5117683Spst 5217683SpstINSTALL = @INSTALL@ 5375107SfennerINSTALL_PROGRAM = @INSTALL_PROGRAM@ 5475107SfennerINSTALL_DATA = @INSTALL_DATA@ 5575107SfennerRANLIB = @RANLIB@ 5617683Spst 5717683Spst# 5817683Spst# Flex and bison allow you to specify the prefixes of the global symbols 5917683Spst# used by the generated parser. This allows programs to use lex/yacc 6017683Spst# and link against libpcap. If you don't have flex or bison, get them. 6117683Spst# 6217683SpstLEX = @V_LEX@ 6317683SpstYACC = @V_YACC@ 6417683Spst 6517683Spst# Explicitly define compilation rule since SunOS 4's make doesn't like gcc. 6617683Spst# Also, gcc does not remove the .o before forking 'as', which can be a 6717683Spst# problem if you don't own the file but can write to the directory. 6817683Spst.c.o: 6917683Spst @rm -f $@ 7026175Sfenner $(CC) $(CFLAGS) -c $(srcdir)/$*.c 7117683Spst 7217683SpstPSRC = pcap-@V_PCAP@.c 7317683SpstCSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \ 7475107Sfenner etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c 7539291SfennerGENSRC = scanner.c grammar.c version.c 7675107SfennerLIBOBJS = @LIBOBJS@ 7717683Spst 7817683SpstSRC = $(PSRC) $(CSRC) $(GENSRC) 7917683Spst 8017683Spst# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot 8117683Spst# hack the extra indirection 8275107SfennerOBJ = $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o) # $(LIBOBJS) 8317683SpstHDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ 8417683Spst ethertype.h gencode.h gnuc.h 8517683SpstGENHDR = \ 8617683Spst tokdefs.h 8717683Spst 8817683SpstTAGHDR = \ 8917683Spst bpf/net/bpf.h 9017683Spst 9117683SpstTAGFILES = \ 9217683Spst $(SRC) $(HDR) $(TAGHDR) 9317683Spst 9417683SpstCLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c 9517683Spst 9639291Sfennerall: libpcap.a 9739291Sfenner 9817683Spstlibpcap.a: $(OBJ) 9926175Sfenner @rm -f $@ 10017683Spst ar rc $@ $(OBJ) 10117683Spst $(RANLIB) $@ 10217683Spst 10326175Sfennerscanner.c: $(srcdir)/scanner.l 10426175Sfenner @rm -f $@ 10526175Sfenner $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@ 10617683Spst 10717683Spstscanner.o: scanner.c tokdefs.h 10856889Sfenner $(CC) $(CFLAGS) -c scanner.c 10956889Sfenner 11017683Spsttokdefs.h: grammar.c 11126175Sfennergrammar.c: $(srcdir)/grammar.y 11226175Sfenner @rm -f grammar.c tokdefs.h 11317683Spst $(YACC) -d $< 11417683Spst mv y.tab.c grammar.c 11517683Spst mv y.tab.h tokdefs.h 11617683Spst 11717683Spstgrammar.o: grammar.c 11826175Sfenner @rm -f $@ 11926175Sfenner $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c 12017683Spst 12139291Sfennerversion.o: version.c 12256889Sfenner $(CC) $(CFLAGS) -c version.c 12356889Sfenner 12475107Sfennersnprintf.o: $(srcdir)/../tcpdump/missing/snprintf.c 12575107Sfenner $(CC) $(CFLAGS) -o $@ -c $(srcdir)/../tcpdump/missing/snprintf.c 12675107Sfenner 12739291Sfennerversion.c: $(srcdir)/VERSION 12839291Sfenner @rm -f $@ 12939291Sfenner sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@ 13039291Sfenner 13175107Sfennerbpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c 13275107Sfenner rm -f bpf_filter.c 13375107Sfenner ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c 13456889Sfenner 13575107Sfennerbpf_filter.o: bpf_filter.c 13675107Sfenner $(CC) $(CFLAGS) -c bpf_filter.c 13717683Spst 13875107Sfennerinstall: 13975107Sfenner [ -d $(DESTDIR)$(libdir) ] || \ 14075107Sfenner (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 14175107Sfenner $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a 14275107Sfenner $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a 14375107Sfenner [ -d $(DESTDIR)$(includedir) ] || \ 14475107Sfenner (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) 14575107Sfenner $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h 14675107Sfenner $(INSTALL_DATA) $(srcdir)/pcap-namedb.h \ 14775107Sfenner $(DESTDIR)$(includedir)/pcap-namedb.h 14875107Sfenner [ -d $(DESTDIR)$(includedir)/net ] || \ 14975107Sfenner (mkdir -p $(DESTDIR)$(includedir)/net; chmod 755 $(DESTDIR)$(includedir)/net) 15075107Sfenner $(INSTALL_DATA) $(srcdir)/bpf/net/bpf.h \ 15175107Sfenner $(DESTDIR)$(includedir)/net/bpf.h 15275107Sfenner [ -d $(DESTDIR)$(mandir)/man3 ] || \ 15375107Sfenner (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3) 15475107Sfenner $(INSTALL_DATA) $(srcdir)/pcap.3 \ 15575107Sfenner $(DESTDIR)$(mandir)/man3/pcap.3 15617683Spst 15775107Sfenneruninstall: 15875107Sfenner rm -f $(DESTDIR)$(libdir)/libpcap.a 15975107Sfenner rm -f $(DESTDIR)$(includedir)/pcap.h 16075107Sfenner rm -f $(DESTDIR)$(includedir)/pcap-namedb.h 16175107Sfenner rm -f $(DESTDIR)$(includedir)/net/bpf.h 16275107Sfenner rm -f $(DESTDIR)$(mandir)/man3/pcap.3 16317683Spst 16417683Spstclean: 16517683Spst rm -f $(CLEANFILES) 16617683Spst 16717683Spstdistclean: 16817683Spst rm -f $(CLEANFILES) Makefile config.cache config.log config.status \ 16975107Sfenner config.h gnuc.h os-proto.h net bpf_filter.c stamp-h stamp-h.in 17017683Spst 17117683Spsttags: $(TAGFILES) 17217683Spst ctags -wtd $(TAGFILES) 17317683Spst 17475107Sfennertar: 17517683Spst @cwd=`pwd` ; dir=`basename $$cwd` ; name=libpcap-`cat VERSION` ; \ 17675107Sfenner list="" ; tar="tar chf" ; \ 17717683Spst for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \ 17817683Spst echo \ 17917683Spst "rm -f ../$$name; ln -s $$dir ../$$name" ; \ 18017683Spst rm -f ../$$name; ln -s $$dir ../$$name ; \ 18117683Spst echo \ 18217683Spst "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \ 18317683Spst (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \ 18417683Spst echo \ 18517683Spst "rm -f ../$$name" ; \ 18617683Spst rm -f ../$$name 18717683Spst 18875107Sfennerdepend: $(GENSRC) bpf_filter.c 18917683Spst ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC) 190