Makefile.in revision 172683
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#
20172683Smlaier# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.293.2.7 2007/09/12 19:48:50 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@
46146773SsamDEFS = @DEFS@ @CPPFLAGS@ @V_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
68172683SmlaierCSRC =	addrtoname.c af.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
69146773Ssam        nlpid.c l2vpn.c machdep.c parsenfsfh.c \
70127668Sbms	print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \
71127668Sbms	print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \
72127668Sbms	print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \
73162017Ssam	print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \
74127668Sbms	print-domain.c print-dvmrp.c print-enc.c print-egp.c \
75146773Ssam	print-eap.c print-eigrp.c\
76127668Sbms	print-esp.c print-ether.c print-fddi.c print-fr.c \
77127668Sbms	print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
78127668Sbms	print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c \
79146773Ssam	print-ipx.c print-isakmp.c print-isoclns.c print-juniper.c print-krb.c \
80127668Sbms	print-l2tp.c print-lane.c print-ldp.c print-llc.c \
81146773Ssam        print-lmp.c print-lspping.c \
82127668Sbms	print-lwres.c print-mobile.c print-mpls.c print-msdp.c \
83172683Smlaier	print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
84172683Smlaier	print-pgm.c print-pim.c print-ppp.c print-pppoe.c \
85127668Sbms	print-pptp.c print-radius.c print-raw.c print-rip.c \
86146773Ssam	print-rsvp.c print-rx.c print-sctp.c print-sip.c print-sl.c print-sll.c \
87162017Ssam	print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
88146773Ssam	print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
89146773Ssam	print-timed.c print-token.c print-udp.c print-vjc.c print-vrrp.c \
90127668Sbms	print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c
9175115Sfenner
9256893SfennerLOCALSRC = @LOCALSRC@
9317680SpstGENSRC = version.c
9456893SfennerLIBOBJS = @LIBOBJS@
9517680Spst
9617680SpstSRC =	$(CSRC) $(GENSRC) $(LOCALSRC)
9717680Spst
9817680Spst# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
9917680Spst# hack the extra indirection
10075115SfennerOBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS)
101162017SsamHDR =   addrtoname.h appletalk.h bootp.h cpack.h dccp.h decnet.h \
10256893Sfenner	ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \
10339297Sfenner	ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \
10498524Sfenner	setsignal.h \
10575115Sfenner	gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \
106127668Sbms	netbios.h oakley.h ospf6.h pf.h ppp.h route6d.h
10717680Spst
10817680SpstTAGHDR = \
10917680Spst	/usr/include/arpa/tftp.h \
11026180Sfenner	/usr/include/net/if_arp.h \
11117680Spst	/usr/include/net/slip.h \
11217680Spst	/usr/include/netinet/if_ether.h \
11317680Spst	/usr/include/netinet/in.h \
11417680Spst	/usr/include/netinet/ip_icmp.h \
11517680Spst	/usr/include/netinet/tcp.h \
11617680Spst	/usr/include/netinet/udp.h \
11717680Spst	/usr/include/protocols/routed.h
11817680Spst
11917680SpstTAGFILES = $(SRC) $(HDR) $(TAGHDR)
12017680Spst
12139297SfennerCLEANFILES = $(PROG) $(OBJ) $(GENSRC)
12217680Spst
12339297Sfennerall: $(PROG)
12439297Sfenner
12539297Sfenner$(PROG): $(OBJ) @V_PCAPDEP@
12617680Spst	@rm -f $@
12739297Sfenner	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
12817680Spst
129127668Sbmsdatalinks.o: $(srcdir)/missing/datalinks.c
130127668Sbms	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
131127668Sbmsdlnames.o: $(srcdir)/missing/dlnames.c
132127668Sbms	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
13356893Sfennergetnameinfo.o: $(srcdir)/missing/getnameinfo.c
13456893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
13556893Sfennergetaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
13656893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
13756893Sfennerinet_pton.o: $(srcdir)/missing/inet_pton.c
13856893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
13956893Sfennerinet_ntop.o: $(srcdir)/missing/inet_ntop.c
14056893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
14156893Sfennerinet_aton.o: $(srcdir)/missing/inet_aton.c
14256893Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
14375115Sfennersnprintf.o: $(srcdir)/missing/snprintf.c
14475115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
14575115Sfennerstrlcat.o: $(srcdir)/missing/strlcat.c
14675115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
14775115Sfennerstrlcpy.o: $(srcdir)/missing/strlcpy.c
14875115Sfenner	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
149127668Sbmsstrsep.o: $(srcdir)/missing/strsep.c
150127668Sbms	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
15156893Sfenner
15217680Spstversion.o: version.c
15356893Sfenner	$(CC) $(CFLAGS) -c version.c
15456893Sfenner
15526180Sfennerversion.c: $(srcdir)/VERSION
15617680Spst	@rm -f $@
15726180Sfenner	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
15817680Spst
15975115Sfennerinstall:
16075115Sfenner	[ -d $(DESTDIR)$(sbindir) ] || \
16175115Sfenner	    (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
16275115Sfenner	$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
16375115Sfenner	[ -d $(DESTDIR)$(mandir)/man1 ] || \
16475115Sfenner	    (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
16575115Sfenner	$(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
16617680Spst
16775115Sfenneruninstall:
16875115Sfenner	rm -f $(DESTDIR)$(sbindir)/$(PROG)
16975115Sfenner	rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
17017680Spst
17175115Sfennerlint: $(GENSRC)
17217680Spst	lint -hbxn $(SRC) | \
17317680Spst	    grep -v 'struct/union .* never defined' | \
17417680Spst	    grep -v 'possible pointer alignment problem'
17517680Spst
17617680Spstclean:
17717680Spst	rm -f $(CLEANFILES)
17817680Spst
17917680Spstdistclean:
18017680Spst	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
18175115Sfenner	    config.h gnuc.h os-proto.h stamp-h stamp-h.in
18217680Spst
18339297Sfennertags: $(TAGFILES)
18417680Spst	ctags -wtd $(TAGFILES)
18517680Spst
186172683Smlaierreleasetar:
18739297Sfenner	@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
188172683Smlaier	   list="" ; make distclean; cd ..; mkdir -p n; cd n; ln -s ../$$dir $$name; \
189172683Smlaier	   tar -c -z -f $$name.tar.gz $$name/. ;
19017680Spst
19175115Sfennerdepend: $(GENSRC)
19275115Sfenner	${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
193