Makefile.in revision 75115
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#
2075115Sfenner# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.244 2000/12/21 10:43:20 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
6826180SfennerCSRC =	tcpdump.c \
6926180Sfenner	print-arp.c print-atalk.c print-atm.c print-bootp.c \
7026180Sfenner	print-decnet.c print-domain.c print-dvmrp.c print-egp.c \
7175115Sfenner	print-ether.c print-fddi.c print-gre.c print-icmp.c print-igmp.c \
7226180Sfenner	print-igrp.c print-ip.c print-ipx.c print-isoclns.c print-krb.c \
7326180Sfenner	print-llc.c print-nfs.c print-ntp.c print-null.c print-ospf.c \
7439297Sfenner	print-pim.c print-ppp.c print-raw.c print-rip.c print-sl.c \
7575115Sfenner	print-snmp.c print-stp.c print-sunrpc.c print-tcp.c print-tftp.c \
7675115Sfenner	print-udp.c print-wb.c addrtoname.c gmt2local.c machdep.c \
7756893Sfenner	parsenfsfh.c util.c savestr.c setsignal.c \
7856893Sfenner	print-esp.c print-ah.c print-vjc.c print-isakmp.c print-chdlc.c \
7956893Sfenner	print-ipcomp.c print-mobile.c print-l2tp.c print-bgp.c print-rx.c \
8056893Sfenner	print-lane.c print-cip.c print-pppoe.c print-lcp.c \
8175115Sfenner	print-smb.c smbutil.c print-ascii.c print-telnet.c print-cnfp.c \
8275115Sfenner	print-vrrp.c print-cdp.c print-token.c print-bxxp.c print-timed.c \
8375115Sfenner	print-radius.c print-sll.c
8475115Sfenner
8556893SfennerLOCALSRC = @LOCALSRC@
8617680SpstGENSRC = version.c
8756893SfennerLIBOBJS = @LIBOBJS@
8817680Spst
8917680SpstSRC =	$(CSRC) $(GENSRC) $(LOCALSRC)
9017680Spst
9117680Spst# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
9217680Spst# hack the extra indirection
9375115SfennerOBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS)
9417680SpstHDR =   addrtoname.h appletalk.h bootp.h decnet.h \
9556893Sfenner	ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \
9639297Sfenner	ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \
9756893Sfenner	savestr.c setsignal.h \
9875115Sfenner	gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \
9975115Sfenner	netbios.h oakley.h ospf6.h ppp.h route6d.h
10017680Spst
10117680SpstTAGHDR = \
10217680Spst	/usr/include/arpa/tftp.h \
10326180Sfenner	/usr/include/net/if_arp.h \
10417680Spst	/usr/include/net/slip.h \
10517680Spst	/usr/include/netinet/if_ether.h \
10617680Spst	/usr/include/netinet/in.h \
10717680Spst	/usr/include/netinet/ip_icmp.h \
10817680Spst	/usr/include/netinet/tcp.h \
10917680Spst	/usr/include/netinet/udp.h \
11017680Spst	/usr/include/protocols/routed.h
11117680Spst
11217680SpstTAGFILES = $(SRC) $(HDR) $(TAGHDR)
11317680Spst
11439297SfennerCLEANFILES = $(PROG) $(OBJ) $(GENSRC)
11517680Spst
11639297Sfennerall: $(PROG)
11739297Sfenner
11839297Sfenner$(PROG): $(OBJ) @V_PCAPDEP@
11917680Spst	@rm -f $@
12039297Sfenner	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
12117680Spst
12256893Sfennergetnameinfo.o: $(srcdir)/missing/getnameinfo.c
12356893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
12456893Sfennergetaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
12556893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
12656893Sfennerinet_pton.o: $(srcdir)/missing/inet_pton.c
12756893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
12856893Sfennerinet_ntop.o: $(srcdir)/missing/inet_ntop.c
12956893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
13056893Sfennerinet_aton.o: $(srcdir)/missing/inet_aton.c
13156893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
13275115Sfennersnprintf.o: $(srcdir)/missing/snprintf.c
13375115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
13475115Sfennerstrlcat.o: $(srcdir)/missing/strlcat.c
13575115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
13675115Sfennerstrlcpy.o: $(srcdir)/missing/strlcpy.c
13775115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
13856893Sfenner
13917680Spstversion.o: version.c
14056893Sfenner	$(CC) $(CFLAGS) -c version.c
14156893Sfenner
14226180Sfennerversion.c: $(srcdir)/VERSION
14317680Spst	@rm -f $@
14426180Sfenner	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
14517680Spst
14675115Sfennerinstall:
14775115Sfenner	[ -d $(DESTDIR)$(sbindir) ] || \
14875115Sfenner	    (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
14975115Sfenner	$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
15075115Sfenner	[ -d $(DESTDIR)$(mandir)/man1 ] || \
15175115Sfenner	    (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
15275115Sfenner	$(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
15317680Spst
15475115Sfenneruninstall:
15575115Sfenner	rm -f $(DESTDIR)$(sbindir)/$(PROG)
15675115Sfenner	rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
15717680Spst
15875115Sfennerlint: $(GENSRC)
15917680Spst	lint -hbxn $(SRC) | \
16017680Spst	    grep -v 'struct/union .* never defined' | \
16117680Spst	    grep -v 'possible pointer alignment problem'
16217680Spst
16317680Spstclean:
16417680Spst	rm -f $(CLEANFILES)
16517680Spst
16617680Spstdistclean:
16717680Spst	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
16875115Sfenner	    config.h gnuc.h os-proto.h stamp-h stamp-h.in
16917680Spst
17039297Sfennertags: $(TAGFILES)
17117680Spst	ctags -wtd $(TAGFILES)
17217680Spst
17375115Sfennertar:
17439297Sfenner	@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
17575115Sfenner	    list="" ; tar="tar chf" ; \
17617680Spst	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
17717680Spst	    echo \
17817680Spst	    "rm -f ../$$name; ln -s $$dir ../$$name" ; \
17917680Spst	     rm -f ../$$name; ln -s $$dir ../$$name ; \
18017680Spst	    echo \
18117680Spst	    "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
18217680Spst	     (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
18317680Spst	    echo \
18417680Spst	    "rm -f ../$$name" ; \
18517680Spst	     rm -f ../$$name
18617680Spst
18775115Sfennerdepend: $(GENSRC)
18875115Sfenner	${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
189