Makefile.in revision 75115
1199989Srdivacky# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 2199989Srdivacky# The Regents of the University of California. All rights reserved. 3199989Srdivacky# 4199989Srdivacky# Redistribution and use in source and binary forms, with or without 5199989Srdivacky# modification, are permitted provided that: (1) source code distributions 6199989Srdivacky# retain the above copyright notice and this paragraph in its entirety, (2) 7199989Srdivacky# distributions including binary code include the above copyright notice and 8199989Srdivacky# this paragraph in its entirety in the documentation or other materials 9199989Srdivacky# provided with the distribution, and (3) all advertising materials mentioning 10199989Srdivacky# features or use of this software display the following acknowledgement: 11199989Srdivacky# ``This product includes software developed by the University of California, 12199989Srdivacky# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 13199989Srdivacky# the University nor the names of its contributors may be used to endorse 14199989Srdivacky# or promote products derived from this software without specific prior 15199989Srdivacky# written permission. 16249423Sdim# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 17234353Sdim# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 18207618Srdivacky# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19249423Sdim# 20199989Srdivacky# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.244 2000/12/21 10:43:20 guy Exp $ (LBL) 21199989Srdivacky 22199989Srdivacky# 23199989Srdivacky# Various configurable paths (remember to edit Makefile.in, not Makefile) 24249423Sdim# 25249423Sdim 26249423Sdim# Top level hierarchy 27249423Sdimprefix = @prefix@ 28249423Sdimexec_prefix = @exec_prefix@ 29249423Sdim# Pathname of directory to install the binary 30249423Sdimsbindir = @sbindir@ 31249423Sdim# Pathname of directory to install the man page 32249423Sdimmandir = @mandir@ 33249423Sdim 34249423Sdim# VPATH 35199989Srdivackysrcdir = @srcdir@ 36263765SdimVPATH = @srcdir@ 37199989Srdivacky 38199989Srdivacky# 39249423Sdim# You shouldn't need to edit anything below here. 40199989Srdivacky# 41199989Srdivacky 42199989SrdivackyCC = @CC@ 43199989SrdivackyPROG = tcpdump 44199989SrdivackyCCOPT = @V_CCOPT@ 45199989SrdivackyINCLS = -I. @V_INCLS@ 46207618SrdivackyDEFS = @DEFS@ 47207618Srdivacky 48199989Srdivacky# Standard CFLAGS 49207618SrdivackyCFLAGS = $(CCOPT) $(DEFS) $(INCLS) 50207618Srdivacky 51210299Sed# Standard LDFLAGS 52210299SedLDFLAGS = @LDFLAGS@ 53210299Sed 54199989Srdivacky# Standard LIBS 55210299SedLIBS = @LIBS@ 56199989Srdivacky 57199989SrdivackyINSTALL = @INSTALL@ 58199989SrdivackyINSTALL_PROGRAM = @INSTALL_PROGRAM@ 59263765SdimINSTALL_DATA = @INSTALL_DATA@ 60263765Sdim 61263508Sdim# Explicitly define compilation rule since SunOS 4's make doesn't like gcc. 62199989Srdivacky# Also, gcc does not remove the .o before forking 'as', which can be a 63199989Srdivacky# problem if you don't own the file but can write to the directory. 64199989Srdivacky.c.o: 65199989Srdivacky @rm -f $@ 66199989Srdivacky $(CC) $(CFLAGS) -c $(srcdir)/$*.c 67210299Sed 68210299SedCSRC = tcpdump.c \ 69263508Sdim print-arp.c print-atalk.c print-atm.c print-bootp.c \ 70263508Sdim print-decnet.c print-domain.c print-dvmrp.c print-egp.c \ 71263508Sdim print-ether.c print-fddi.c print-gre.c print-icmp.c print-igmp.c \ 72263508Sdim print-igrp.c print-ip.c print-ipx.c print-isoclns.c print-krb.c \ 73210299Sed print-llc.c print-nfs.c print-ntp.c print-null.c print-ospf.c \ 74199989Srdivacky print-pim.c print-ppp.c print-raw.c print-rip.c print-sl.c \ 75199989Srdivacky print-snmp.c print-stp.c print-sunrpc.c print-tcp.c print-tftp.c \ 76199989Srdivacky print-udp.c print-wb.c addrtoname.c gmt2local.c machdep.c \ 77207618Srdivacky parsenfsfh.c util.c savestr.c setsignal.c \ 78207618Srdivacky print-esp.c print-ah.c print-vjc.c print-isakmp.c print-chdlc.c \ 79207618Srdivacky print-ipcomp.c print-mobile.c print-l2tp.c print-bgp.c print-rx.c \ 80207618Srdivacky print-lane.c print-cip.c print-pppoe.c print-lcp.c \ 81226633Sdim print-smb.c smbutil.c print-ascii.c print-telnet.c print-cnfp.c \ 82263508Sdim print-vrrp.c print-cdp.c print-token.c print-bxxp.c print-timed.c \ 83199989Srdivacky print-radius.c print-sll.c 84263508Sdim 85199989SrdivackyLOCALSRC = @LOCALSRC@ 86199989SrdivackyGENSRC = version.c 87199989SrdivackyLIBOBJS = @LIBOBJS@ 88199989Srdivacky 89212904SdimSRC = $(CSRC) $(GENSRC) $(LOCALSRC) 90212904Sdim 91212904Sdim# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot 92212904Sdim# hack the extra indirection 93212904SdimOBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) 94212904SdimHDR = addrtoname.h appletalk.h bootp.h decnet.h \ 95234353Sdim ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \ 96212904Sdim ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \ 97199989Srdivacky savestr.c setsignal.h \ 98234353Sdim gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \ 99243830Sdim netbios.h oakley.h ospf6.h ppp.h route6d.h 100199989Srdivacky 101199989SrdivackyTAGHDR = \ 102199989Srdivacky /usr/include/arpa/tftp.h \ 103234353Sdim /usr/include/net/if_arp.h \ 104234353Sdim /usr/include/net/slip.h \ 105263765Sdim /usr/include/netinet/if_ether.h \ 106263765Sdim /usr/include/netinet/in.h \ 107263765Sdim /usr/include/netinet/ip_icmp.h \ 108263765Sdim /usr/include/netinet/tcp.h \ 109263765Sdim /usr/include/netinet/udp.h \ 110263765Sdim /usr/include/protocols/routed.h 111263765Sdim 112263765SdimTAGFILES = $(SRC) $(HDR) $(TAGHDR) 113263765Sdim 114263765SdimCLEANFILES = $(PROG) $(OBJ) $(GENSRC) 115263765Sdim 116263765Sdimall: $(PROG) 117263765Sdim 118263765Sdim$(PROG): $(OBJ) @V_PCAPDEP@ 119263765Sdim @rm -f $@ 120263765Sdim $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) 121263765Sdim 122263765Sdimgetnameinfo.o: $(srcdir)/missing/getnameinfo.c 123263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c 124263765Sdimgetaddrinfo.o: $(srcdir)/missing/getaddrinfo.c 125263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c 126263765Sdiminet_pton.o: $(srcdir)/missing/inet_pton.c 127263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c 128263765Sdiminet_ntop.o: $(srcdir)/missing/inet_ntop.c 129263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c 130263765Sdiminet_aton.o: $(srcdir)/missing/inet_aton.c 131263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c 132263765Sdimsnprintf.o: $(srcdir)/missing/snprintf.c 133263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c 134263765Sdimstrlcat.o: $(srcdir)/missing/strlcat.c 135263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c 136263765Sdimstrlcpy.o: $(srcdir)/missing/strlcpy.c 137263765Sdim $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c 138263765Sdim 139263765Sdimversion.o: version.c 140263765Sdim $(CC) $(CFLAGS) -c version.c 141263765Sdim 142212904Sdimversion.c: $(srcdir)/VERSION 143212904Sdim @rm -f $@ 144207618Srdivacky sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@ 145199989Srdivacky 146199989Srdivackyinstall: 147199989Srdivacky [ -d $(DESTDIR)$(sbindir) ] || \ 148199989Srdivacky (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir)) 149212904Sdim $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) 150212904Sdim [ -d $(DESTDIR)$(mandir)/man1 ] || \ 151212904Sdim (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1) 152212904Sdim $(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1 153212904Sdim 154263508Sdimuninstall: 155263508Sdim rm -f $(DESTDIR)$(sbindir)/$(PROG) 156263508Sdim rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1 157212904Sdim 158263508Sdimlint: $(GENSRC) 159212904Sdim lint -hbxn $(SRC) | \ 160212904Sdim grep -v 'struct/union .* never defined' | \ 161212904Sdim grep -v 'possible pointer alignment problem' 162212904Sdim 163212904Sdimclean: 164212904Sdim rm -f $(CLEANFILES) 165212904Sdim 166212904Sdimdistclean: 167212904Sdim rm -f $(CLEANFILES) Makefile config.cache config.log config.status \ 168212904Sdim config.h gnuc.h os-proto.h stamp-h stamp-h.in 169212904Sdim 170212904Sdimtags: $(TAGFILES) 171212904Sdim ctags -wtd $(TAGFILES) 172212904Sdim 173212904Sdimtar: 174212904Sdim @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \ 175212904Sdim list="" ; tar="tar chf" ; \ 176212904Sdim for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \ 177212904Sdim echo \ 178212904Sdim "rm -f ../$$name; ln -s $$dir ../$$name" ; \ 179212904Sdim rm -f ../$$name; ln -s $$dir ../$$name ; \ 180212904Sdim echo \ 181199989Srdivacky "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \ 182199989Srdivacky (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \ 183199989Srdivacky echo \ 184207618Srdivacky "rm -f ../$$name" ; \ 185199989Srdivacky rm -f ../$$name 186199989Srdivacky 187199989Srdivackydepend: $(GENSRC) 188199989Srdivacky ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC) 189199989Srdivacky