Makefile.in revision 39297
139297Sfenner#  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
217680Spst# 	The Regents of the University of California.  All rights reserved.
317680Spst#
417680Spst#  Redistribution and use in source and binary forms, with or without
517680Spst#  modification, are permitted provided that: (1) source code distributions
617680Spst#  retain the above copyright notice and this paragraph in its entirety, (2)
717680Spst#  distributions including binary code include the above copyright notice and
817680Spst#  this paragraph in its entirety in the documentation or other materials
917680Spst#  provided with the distribution, and (3) all advertising materials mentioning
1017680Spst#  features or use of this software display the following acknowledgement:
1117680Spst#  ``This product includes software developed by the University of California,
1217680Spst#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
1317680Spst#  the University nor the names of its contributors may be used to endorse
1417680Spst#  or promote products derived from this software without specific prior
1517680Spst#  written permission.
1617680Spst#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
1717680Spst#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1817680Spst#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1917680Spst#
2039297Sfenner# @(#) $Header: Makefile.in,v 1.207 97/08/17 13:53:29 leres Exp $ (LBL)
2117680Spst
2217680Spst#
2317680Spst# Various configurable paths (remember to edit Makefile.in, not Makefile)
2417680Spst#
2517680Spst
2617680Spst# Top level hierarchy
2717680Spstprefix = @prefix@
2817680Spstexec_prefix = @exec_prefix@
2917680Spst# Pathname of directory to install the binary
3017680SpstBINDEST = @sbindir@
3117680Spst# Pathname of directory to install the man page
3217680SpstMANDEST = @mandir@
3317680Spst
3426180Sfenner# VPATH
3526180Sfennersrcdir = @srcdir@
3626180SfennerVPATH = @srcdir@
3726180Sfenner
3817680Spst#
3917680Spst# You shouldn't need to edit anything below here.
4017680Spst#
4117680Spst
4217680SpstCC = @CC@
4339297SfennerPROG = tcpdump
4417680SpstCCOPT = @V_CCOPT@
4517680SpstINCLS = -I. @V_INCLS@
4639297SfennerDEFS = @DEFS@ -DHAVE_FDDI
4717680Spst
4817680Spst# Standard CFLAGS
4917680SpstCFLAGS = $(CCOPT) $(DEFS) $(INCLS)
5017680Spst
5139297Sfenner# Standard LDFLAGS
5239297SfennerLDFLAGS = @LDFLAGS@
5339297Sfenner
5417680Spst# Standard LIBS
5517680SpstLIBS = @LIBS@
5617680Spst
5717680SpstINSTALL = @INSTALL@
5817680Spst
5917680Spst# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
6017680Spst# Also, gcc does not remove the .o before forking 'as', which can be a
6117680Spst# problem if you don't own the file but can write to the directory.
6217680Spst.c.o:
6317680Spst	@rm -f $@
6426180Sfenner	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
6517680Spst
6626180SfennerCSRC =	tcpdump.c \
6726180Sfenner	print-arp.c print-atalk.c print-atm.c print-bootp.c \
6826180Sfenner	print-decnet.c print-domain.c print-dvmrp.c print-egp.c \
6926180Sfenner	print-ether.c print-fddi.c print-gre.c print-icmp.c \
7026180Sfenner	print-igrp.c print-ip.c print-ipx.c print-isoclns.c print-krb.c \
7126180Sfenner	print-llc.c print-nfs.c print-ntp.c print-null.c print-ospf.c \
7239297Sfenner	print-pim.c print-ppp.c print-raw.c print-rip.c print-sl.c \
7339297Sfenner	print-snmp.c print-sunrpc.c print-tcp.c print-tftp.c print-udp.c \
7439297Sfenner	print-wb.c addrtoname.c bpf_dump.c gmt2local.c machdep.c \
7539297Sfenner	parsenfsfh.c util.c savestr.c setsignal.c
7617680SpstLOCALSRC =
7717680SpstGENSRC = version.c
7817680Spst
7917680SpstSRC =	$(CSRC) $(GENSRC) $(LOCALSRC)
8017680Spst
8117680Spst# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
8217680Spst# hack the extra indirection
8317680SpstOBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) @LIBOBJS@
8417680SpstHDR =   addrtoname.h appletalk.h bootp.h decnet.h \
8539297Sfenner	ethertype.h extract.h fddi.h gmt2local.h interface.h igrp.h \
8639297Sfenner	ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \
8739297Sfenner	savestr.c setsignal.h
8817680Spst
8917680SpstTAGHDR = \
9017680Spst	/usr/include/arpa/tftp.h \
9126180Sfenner	/usr/include/net/if_arp.h \
9217680Spst	/usr/include/net/slip.h \
9317680Spst	/usr/include/netinet/if_ether.h \
9417680Spst	/usr/include/netinet/in.h \
9517680Spst	/usr/include/netinet/ip_icmp.h \
9617680Spst	/usr/include/netinet/tcp.h \
9717680Spst	/usr/include/netinet/udp.h \
9817680Spst	/usr/include/protocols/routed.h
9917680Spst
10017680SpstTAGFILES = $(SRC) $(HDR) $(TAGHDR)
10117680Spst
10239297SfennerCLEANFILES = $(PROG) $(OBJ) $(GENSRC)
10317680Spst
10439297Sfennerall: $(PROG)
10539297Sfenner
10639297Sfenner$(PROG): $(OBJ) @V_PCAPDEP@
10717680Spst	@rm -f $@
10839297Sfenner	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
10917680Spst
11017680Spstversion.o: version.c
11126180Sfennerversion.c: $(srcdir)/VERSION
11217680Spst	@rm -f $@
11326180Sfenner	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
11417680Spst
11517680Spstinstall: force
11639297Sfenner	$(INSTALL) -m 550 -o bin -g @V_GROUP@ $(PROG) \
11739297Sfenner	    $(DESTDIR)$(BINDEST)/$(PROG)
11817680Spst
11917680Spstinstall-man: force
12039297Sfenner	$(INSTALL) -m 444 -o bin -g bin $(srcdir)/$(PROG).1 \
12139297Sfenner	    $(DESTDIR)$(MANDEST)/man1/$(PROG).1
12217680Spst
12339297Sfennerlint: $(GENSRC) force
12417680Spst	lint -hbxn $(SRC) | \
12517680Spst	    grep -v 'struct/union .* never defined' | \
12617680Spst	    grep -v 'possible pointer alignment problem'
12717680Spst
12817680Spstclean:
12917680Spst	rm -f $(CLEANFILES)
13017680Spst
13117680Spstdistclean:
13217680Spst	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
13317680Spst	    gnuc.h os-proto.h
13417680Spst
13539297Sfennertags: $(TAGFILES)
13617680Spst	ctags -wtd $(TAGFILES)
13717680Spst
13839297Sfennertar: force
13939297Sfenner	@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
14017680Spst	    list="" ; tar="tar chFFf" ; \
14117680Spst	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
14217680Spst	    echo \
14317680Spst	    "rm -f ../$$name; ln -s $$dir ../$$name" ; \
14417680Spst	     rm -f ../$$name; ln -s $$dir ../$$name ; \
14517680Spst	    echo \
14617680Spst	    "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
14717680Spst	     (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
14817680Spst	    echo \
14917680Spst	    "rm -f ../$$name" ; \
15017680Spst	     rm -f ../$$name
15117680Spst
15239297Sfennerforce: /tmp
15339297Sfennerdepend: $(GENSRC) force
15417680Spst	./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
155