Makefile.in revision 98524
1280182Sjfv#  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
2280182Sjfv# 	The Regents of the University of California.  All rights reserved.
3280182Sjfv#
4280182Sjfv#  Redistribution and use in source and binary forms, with or without
5280182Sjfv#  modification, are permitted provided that: (1) source code distributions
6280182Sjfv#  retain the above copyright notice and this paragraph in its entirety, (2)
7280182Sjfv#  distributions including binary code include the above copyright notice and
8280182Sjfv#  this paragraph in its entirety in the documentation or other materials
9280182Sjfv#  provided with the distribution, and (3) all advertising materials mentioning
10280182Sjfv#  features or use of this software display the following acknowledgement:
11280182Sjfv#  ``This product includes software developed by the University of California,
12280182Sjfv#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
13280182Sjfv#  the University nor the names of its contributors may be used to endorse
14280182Sjfv#  or promote products derived from this software without specific prior
15280182Sjfv#  written permission.
16280182Sjfv#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
17280182Sjfv#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
18280182Sjfv#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19280182Sjfv#
20280182Sjfv# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.260 2001/12/10 08:21:23 guy Exp $ (LBL)
21280182Sjfv
22280182Sjfv#
23280182Sjfv# Various configurable paths (remember to edit Makefile.in, not Makefile)
24280182Sjfv#
25280182Sjfv
26280182Sjfv# Top level hierarchy
27280182Sjfvprefix = @prefix@
28280182Sjfvexec_prefix = @exec_prefix@
29280182Sjfv# Pathname of directory to install the binary
30280182Sjfvsbindir = @sbindir@
31280182Sjfv# Pathname of directory to install the man page
32280182Sjfvmandir = @mandir@
33280182Sjfv
34280182Sjfv# VPATH
35280182Sjfvsrcdir = @srcdir@
36280182SjfvVPATH = @srcdir@
37280182Sjfv
38280182Sjfv#
39280182Sjfv# You shouldn't need to edit anything below here.
40280182Sjfv#
41280182Sjfv
42280182SjfvCC = @CC@
43295008SsbrunoPROG = tcpdump
44295008SsbrunoCCOPT = @V_CCOPT@
45295008SsbrunoINCLS = -I. @V_INCLS@
46295008SsbrunoDEFS = @DEFS@
47295008Ssbruno
48280182Sjfv# Standard CFLAGS
49280182SjfvCFLAGS = $(CCOPT) $(DEFS) $(INCLS)
50280182Sjfv
51295524Ssbruno# Standard LDFLAGS
52280182SjfvLDFLAGS = @LDFLAGS@
53295524Ssbruno
54280182Sjfv# Standard LIBS
55280182SjfvLIBS = @LIBS@
56280182Sjfv
57280182SjfvINSTALL = @INSTALL@
58280182SjfvINSTALL_PROGRAM = @INSTALL_PROGRAM@
59280182SjfvINSTALL_DATA = @INSTALL_DATA@
60280182Sjfv
61280182Sjfv# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
62280182Sjfv# Also, gcc does not remove the .o before forking 'as', which can be a
63280182Sjfv# problem if you don't own the file but can write to the directory.
64280182Sjfv.c.o:
65280182Sjfv	@rm -f $@
66280182Sjfv	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
67280182Sjfv
68280182SjfvCSRC =	addrtoname.c gmt2local.c machdep.c parsenfsfh.c \
69280182Sjfv	print-802_11.c print-ah.c print-arcnet.c print-arp.c \
70280182Sjfv	print-ascii.c print-atalk.c print-atm.c print-bgp.c \
71280182Sjfv	print-bootp.c print-beep.c print-cdp.c print-chdlc.c \
72280182Sjfv	print-cip.c print-cnfp.c print-decnet.c print-domain.c \
73280182Sjfv	print-dvmrp.c print-egp.c print-esp.c print-ether.c \
74280182Sjfv	print-fddi.c print-gre.c print-hsrp.c print-icmp.c \
75280182Sjfv	print-igmp.c print-igrp.c print-ip.c print-ipcomp.c \
76280182Sjfv	print-ipx.c print-isakmp.c print-isoclns.c print-krb.c \
77280182Sjfv	print-l2tp.c print-lane.c print-lcp.c print-llc.c print-lwres.c \
78280182Sjfv	print-msdp.c print-mobile.c print-mpls.c print-nfs.c \
79280182Sjfv	print-ntp.c print-null.c print-ospf.c print-pim.c \
80280182Sjfv	print-ppp.c print-pppoe.c print-pptp.c print-radius.c \
81280182Sjfv	print-raw.c print-rip.c print-rx.c print-sctp.c \
82280182Sjfv	print-sl.c print-sll.c print-snmp.c \
83280182Sjfv	print-stp.c print-sunrpc.c print-tcp.c \
84280182Sjfv	print-telnet.c print-tftp.c print-timed.c print-token.c \
85280182Sjfv	print-udp.c print-vjc.c print-vrrp.c print-wb.c print-zephyr.c \
86280182Sjfv	setsignal.c tcpdump.c util.c
87280182Sjfv
88280182SjfvLOCALSRC = @LOCALSRC@
89280182SjfvGENSRC = version.c
90280182SjfvLIBOBJS = @LIBOBJS@
91280182Sjfv
92280182SjfvSRC =	$(CSRC) $(GENSRC) $(LOCALSRC)
93295524Ssbruno
94280182Sjfv# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
95280182Sjfv# hack the extra indirection
96280182SjfvOBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS)
97295524SsbrunoHDR =   addrtoname.h appletalk.h bootp.h decnet.h \
98280182Sjfv	ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \
99280182Sjfv	ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \
100280182Sjfv	setsignal.h \
101280182Sjfv	gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \
102280182Sjfv	netbios.h oakley.h ospf6.h ppp.h route6d.h
103280182Sjfv
104280182SjfvTAGHDR = \
105280182Sjfv	/usr/include/arpa/tftp.h \
106280182Sjfv	/usr/include/net/if_arp.h \
107280182Sjfv	/usr/include/net/slip.h \
108280182Sjfv	/usr/include/netinet/if_ether.h \
109280182Sjfv	/usr/include/netinet/in.h \
110280182Sjfv	/usr/include/netinet/ip_icmp.h \
111280182Sjfv	/usr/include/netinet/tcp.h \
112280182Sjfv	/usr/include/netinet/udp.h \
113280182Sjfv	/usr/include/protocols/routed.h
114280182Sjfv
115280182SjfvTAGFILES = $(SRC) $(HDR) $(TAGHDR)
116280182Sjfv
117283620SerjCLEANFILES = $(PROG) $(OBJ) $(GENSRC)
118283620Serj
119280182Sjfvall: $(PROG)
120280182Sjfv
121280182Sjfv$(PROG): $(OBJ) @V_PCAPDEP@
122280182Sjfv	@rm -f $@
123280182Sjfv	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
124280182Sjfv
125280182Sjfvgetnameinfo.o: $(srcdir)/missing/getnameinfo.c
126280182Sjfv	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
127280182Sjfvgetaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
128280182Sjfv	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
129280182Sjfvinet_pton.o: $(srcdir)/missing/inet_pton.c
130280182Sjfv	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
131295524Ssbrunoinet_ntop.o: $(srcdir)/missing/inet_ntop.c
132280182Sjfv	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
133280182Sjfvinet_aton.o: $(srcdir)/missing/inet_aton.c
134280182Sjfv	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
135280182Sjfvsnprintf.o: $(srcdir)/missing/snprintf.c
136280182Sjfv	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
137280182Sjfvstrlcat.o: $(srcdir)/missing/strlcat.c
138295008Ssbruno	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
139283620Serjstrlcpy.o: $(srcdir)/missing/strlcpy.c
140283620Serj	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
141280182Sjfv
142283620Serjversion.o: version.c
143283620Serj	$(CC) $(CFLAGS) -c version.c
144280182Sjfv
145280182Sjfvversion.c: $(srcdir)/VERSION
146280182Sjfv	@rm -f $@
147280182Sjfv	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
148280182Sjfv
149280182Sjfvinstall:
150295524Ssbruno	[ -d $(DESTDIR)$(sbindir) ] || \
151280182Sjfv	    (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
152280182Sjfv	$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
153280182Sjfv	[ -d $(DESTDIR)$(mandir)/man1 ] || \
154280182Sjfv	    (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
155280182Sjfv	$(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
156280182Sjfv
157280182Sjfvuninstall:
158280182Sjfv	rm -f $(DESTDIR)$(sbindir)/$(PROG)
159280182Sjfv	rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
160280182Sjfv
161280182Sjfvlint: $(GENSRC)
162280182Sjfv	lint -hbxn $(SRC) | \
163280182Sjfv	    grep -v 'struct/union .* never defined' | \
164280182Sjfv	    grep -v 'possible pointer alignment problem'
165280182Sjfv
166283620Serjclean:
167283620Serj	rm -f $(CLEANFILES)
168295534Ssmh
169295534Ssmhdistclean:
170280182Sjfv	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
171283620Serj	    config.h gnuc.h os-proto.h stamp-h stamp-h.in
172294034Ssbruno
173295524Ssbrunotags: $(TAGFILES)
174295534Ssmh	ctags -wtd $(TAGFILES)
175295534Ssmh
176283620Serjtar:
177283620Serj	@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
178283620Serj	    list="" ; tar="tar chf" ; \
179283620Serj	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
180295524Ssbruno	    echo \
181295524Ssbruno	    "rm -f ../$$name; ln -s $$dir ../$$name" ; \
182295524Ssbruno	     rm -f ../$$name; ln -s $$dir ../$$name ; \
183295524Ssbruno	    echo \
184283620Serj	    "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
185283620Serj	     (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
186283620Serj	    echo \
187283620Serj	    "rm -f ../$$name" ; \
188283620Serj	     rm -f ../$$name
189283620Serj
190295524Ssbrunodepend: $(GENSRC)
191283620Serj	${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
192280182Sjfv