Makefile.in revision 98524
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#
2098524Sfenner# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.260 2001/12/10 08:21:23 guy 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
3075115Sfennersbindir = @sbindir@
3117680Spst# Pathname of directory to install the man page
3275115Sfennermandir = @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@
4656893SfennerDEFS = @DEFS@
4717680Spst
4817680Spst# Standard CFLAGS
4917680SpstCFLAGS = $(CCOPT) $(DEFS) $(INCLS)
5017680Spst
5139297Sfenner# Standard LDFLAGS
5239297SfennerLDFLAGS = @LDFLAGS@
5339297Sfenner
5417680Spst# Standard LIBS
5517680SpstLIBS = @LIBS@
5617680Spst
5717680SpstINSTALL = @INSTALL@
5875115SfennerINSTALL_PROGRAM = @INSTALL_PROGRAM@
5975115SfennerINSTALL_DATA = @INSTALL_DATA@
6017680Spst
6117680Spst# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
6217680Spst# Also, gcc does not remove the .o before forking 'as', which can be a
6317680Spst# problem if you don't own the file but can write to the directory.
6417680Spst.c.o:
6517680Spst	@rm -f $@
6626180Sfenner	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
6717680Spst
6898524SfennerCSRC =	addrtoname.c gmt2local.c machdep.c parsenfsfh.c \
6998524Sfenner	print-802_11.c print-ah.c print-arcnet.c print-arp.c \
7098524Sfenner	print-ascii.c print-atalk.c print-atm.c print-bgp.c \
7198524Sfenner	print-bootp.c print-beep.c print-cdp.c print-chdlc.c \
7298524Sfenner	print-cip.c print-cnfp.c print-decnet.c print-domain.c \
7398524Sfenner	print-dvmrp.c print-egp.c print-esp.c print-ether.c \
7498524Sfenner	print-fddi.c print-gre.c print-hsrp.c print-icmp.c \
7598524Sfenner	print-igmp.c print-igrp.c print-ip.c print-ipcomp.c \
7698524Sfenner	print-ipx.c print-isakmp.c print-isoclns.c print-krb.c \
7798524Sfenner	print-l2tp.c print-lane.c print-lcp.c print-llc.c print-lwres.c \
7898524Sfenner	print-msdp.c print-mobile.c print-mpls.c print-nfs.c \
7998524Sfenner	print-ntp.c print-null.c print-ospf.c print-pim.c \
8098524Sfenner	print-ppp.c print-pppoe.c print-pptp.c print-radius.c \
8198524Sfenner	print-raw.c print-rip.c print-rx.c print-sctp.c \
8298524Sfenner	print-sl.c print-sll.c print-snmp.c \
8398524Sfenner	print-stp.c print-sunrpc.c print-tcp.c \
8498524Sfenner	print-telnet.c print-tftp.c print-timed.c print-token.c \
8598524Sfenner	print-udp.c print-vjc.c print-vrrp.c print-wb.c print-zephyr.c \
8698524Sfenner	setsignal.c tcpdump.c util.c
8775115Sfenner
8856893SfennerLOCALSRC = @LOCALSRC@
8917680SpstGENSRC = version.c
9056893SfennerLIBOBJS = @LIBOBJS@
9117680Spst
9217680SpstSRC =	$(CSRC) $(GENSRC) $(LOCALSRC)
9317680Spst
9417680Spst# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
9517680Spst# hack the extra indirection
9675115SfennerOBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS)
9717680SpstHDR =   addrtoname.h appletalk.h bootp.h decnet.h \
9856893Sfenner	ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \
9939297Sfenner	ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \
10098524Sfenner	setsignal.h \
10175115Sfenner	gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \
10275115Sfenner	netbios.h oakley.h ospf6.h ppp.h route6d.h
10317680Spst
10417680SpstTAGHDR = \
10517680Spst	/usr/include/arpa/tftp.h \
10626180Sfenner	/usr/include/net/if_arp.h \
10717680Spst	/usr/include/net/slip.h \
10817680Spst	/usr/include/netinet/if_ether.h \
10917680Spst	/usr/include/netinet/in.h \
11017680Spst	/usr/include/netinet/ip_icmp.h \
11117680Spst	/usr/include/netinet/tcp.h \
11217680Spst	/usr/include/netinet/udp.h \
11317680Spst	/usr/include/protocols/routed.h
11417680Spst
11517680SpstTAGFILES = $(SRC) $(HDR) $(TAGHDR)
11617680Spst
11739297SfennerCLEANFILES = $(PROG) $(OBJ) $(GENSRC)
11817680Spst
11939297Sfennerall: $(PROG)
12039297Sfenner
12139297Sfenner$(PROG): $(OBJ) @V_PCAPDEP@
12217680Spst	@rm -f $@
12339297Sfenner	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
12417680Spst
12556893Sfennergetnameinfo.o: $(srcdir)/missing/getnameinfo.c
12656893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
12756893Sfennergetaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
12856893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
12956893Sfennerinet_pton.o: $(srcdir)/missing/inet_pton.c
13056893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
13156893Sfennerinet_ntop.o: $(srcdir)/missing/inet_ntop.c
13256893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
13356893Sfennerinet_aton.o: $(srcdir)/missing/inet_aton.c
13456893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
13575115Sfennersnprintf.o: $(srcdir)/missing/snprintf.c
13675115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
13775115Sfennerstrlcat.o: $(srcdir)/missing/strlcat.c
13875115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
13975115Sfennerstrlcpy.o: $(srcdir)/missing/strlcpy.c
14075115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
14156893Sfenner
14217680Spstversion.o: version.c
14356893Sfenner	$(CC) $(CFLAGS) -c version.c
14456893Sfenner
14526180Sfennerversion.c: $(srcdir)/VERSION
14617680Spst	@rm -f $@
14726180Sfenner	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
14817680Spst
14975115Sfennerinstall:
15075115Sfenner	[ -d $(DESTDIR)$(sbindir) ] || \
15175115Sfenner	    (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
15275115Sfenner	$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
15375115Sfenner	[ -d $(DESTDIR)$(mandir)/man1 ] || \
15475115Sfenner	    (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
15575115Sfenner	$(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
15617680Spst
15775115Sfenneruninstall:
15875115Sfenner	rm -f $(DESTDIR)$(sbindir)/$(PROG)
15975115Sfenner	rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
16017680Spst
16175115Sfennerlint: $(GENSRC)
16217680Spst	lint -hbxn $(SRC) | \
16317680Spst	    grep -v 'struct/union .* never defined' | \
16417680Spst	    grep -v 'possible pointer alignment problem'
16517680Spst
16617680Spstclean:
16717680Spst	rm -f $(CLEANFILES)
16817680Spst
16917680Spstdistclean:
17017680Spst	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
17175115Sfenner	    config.h gnuc.h os-proto.h stamp-h stamp-h.in
17217680Spst
17339297Sfennertags: $(TAGFILES)
17417680Spst	ctags -wtd $(TAGFILES)
17517680Spst
17675115Sfennertar:
17739297Sfenner	@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
17875115Sfenner	    list="" ; tar="tar chf" ; \
17917680Spst	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
18017680Spst	    echo \
18117680Spst	    "rm -f ../$$name; ln -s $$dir ../$$name" ; \
18217680Spst	     rm -f ../$$name; ln -s $$dir ../$$name ; \
18317680Spst	    echo \
18417680Spst	    "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
18517680Spst	     (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
18617680Spst	    echo \
18717680Spst	    "rm -f ../$$name" ; \
18817680Spst	     rm -f ../$$name
18917680Spst
19075115Sfennerdepend: $(GENSRC)
19175115Sfenner	${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
192