Makefile.in revision 26180
117680Spst#  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996
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#
2026180Sfenner# @(#) $Header: Makefile.in,v 1.198 96/12/05 22:12:11 leres 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
3017680SpstBINDEST = @sbindir@
3117680Spst# Pathname of directory to install the man page
3217680SpstMANDEST = @mandir@
3317680Spst
3426180Sfenner# VPATH
3526180Sfennersrcdir = @srcdir@
3626180SfennerVPATH = @srcdir@
3726180Sfenner
3817680Spst#
3917680Spst# You shouldn't need to edit anything below here.
4017680Spst#
4117680Spst
4217680SpstCC = @CC@
4317680SpstCCOPT = @V_CCOPT@
4417680SpstINCLS = -I. @V_INCLS@
4517680SpstDEFS = @DEFS@ -DPPP -DHAVE_FDDI
4617680Spst
4717680Spst# Standard CFLAGS
4817680SpstCFLAGS = $(CCOPT) $(DEFS) $(INCLS)
4917680Spst
5017680Spst# Standard LIBS
5117680SpstLIBS = @LIBS@
5217680Spst
5317680SpstINSTALL = @INSTALL@
5417680Spst
5517680Spst# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
5617680Spst# Also, gcc does not remove the .o before forking 'as', which can be a
5717680Spst# problem if you don't own the file but can write to the directory.
5817680Spst.c.o:
5917680Spst	@rm -f $@
6026180Sfenner	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
6117680Spst
6226180SfennerCSRC =	tcpdump.c \
6326180Sfenner	print-arp.c print-atalk.c print-atm.c print-bootp.c \
6426180Sfenner	print-decnet.c print-domain.c print-dvmrp.c print-egp.c \
6526180Sfenner	print-ether.c print-fddi.c print-gre.c print-icmp.c \
6626180Sfenner	print-igrp.c print-ip.c print-ipx.c print-isoclns.c print-krb.c \
6726180Sfenner	print-llc.c print-nfs.c print-ntp.c print-null.c print-ospf.c \
6826180Sfenner	print-pim.c print-ppp.c print-rip.c print-sl.c print-snmp.c \
6926180Sfenner	print-sunrpc.c print-tcp.c print-tftp.c print-udp.c print-wb.c \
7026180Sfenner	addrtoname.c bpf_dump.c machdep.c parsenfsfh.c util.c
7117680SpstLOCALSRC =
7217680SpstGENSRC = version.c
7317680Spst
7417680SpstSRC =	$(CSRC) $(GENSRC) $(LOCALSRC)
7517680Spst
7617680Spst# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
7717680Spst# hack the extra indirection
7817680SpstOBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) @LIBOBJS@
7917680SpstHDR =   addrtoname.h appletalk.h bootp.h decnet.h \
8017680Spst	ethertype.h extract.h fddi.h interface.h igrp.h ipx.h \
8117680Spst	llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h
8217680Spst
8317680SpstTAGHDR = \
8417680Spst	/usr/include/arpa/tftp.h \
8526180Sfenner	/usr/include/net/if_arp.h \
8617680Spst	/usr/include/net/slip.h \
8717680Spst	/usr/include/netinet/if_ether.h \
8817680Spst	/usr/include/netinet/in.h \
8917680Spst	/usr/include/netinet/ip_icmp.h \
9017680Spst	/usr/include/netinet/tcp.h \
9117680Spst	/usr/include/netinet/udp.h \
9217680Spst	/usr/include/protocols/routed.h
9317680Spst
9417680SpstTAGFILES = $(SRC) $(HDR) $(TAGHDR)
9517680Spst
9617680SpstCLEANFILES = $(OBJ) tcpdump $(GENSRC)
9717680Spst
9817680Spsttcpdump: $(OBJ) @V_PCAPDEP@
9917680Spst	@rm -f $@
10017680Spst	$(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
10117680Spst
10217680Spstversion.o: version.c
10326180Sfennerversion.c: $(srcdir)/VERSION
10417680Spst	@rm -f $@
10526180Sfenner	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
10617680Spst
10717680Spstinstall: force
10817680Spst	$(INSTALL) -m 550 -o bin -g @V_GROUP@ tcpdump $(DESTDIR)$(BINDEST)
10917680Spst
11017680Spstinstall-man: force
11126180Sfenner	$(INSTALL) -m 444 -o bin -g bin $(srcdir)/tcpdump.1 \
11226180Sfenner	    $(DESTDIR)$(MANDEST)/man1
11317680Spst
11417680Spstlint:	$(GENSRC) force
11517680Spst	lint -hbxn $(SRC) | \
11617680Spst	    grep -v 'struct/union .* never defined' | \
11717680Spst	    grep -v 'possible pointer alignment problem'
11817680Spst
11917680Spstclean:
12017680Spst	rm -f $(CLEANFILES)
12117680Spst
12217680Spstdistclean:
12317680Spst	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
12417680Spst	    gnuc.h os-proto.h
12517680Spst
12617680Spsttags:	$(TAGFILES)
12717680Spst	ctags -wtd $(TAGFILES)
12817680Spst
12917680Spsttar:	force
13017680Spst	@cwd=`pwd` ; dir=`basename $$cwd` ; name=tcpdump-`cat VERSION` ; \
13117680Spst	    list="" ; tar="tar chFFf" ; \
13217680Spst	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
13317680Spst	    echo \
13417680Spst	    "rm -f ../$$name; ln -s $$dir ../$$name" ; \
13517680Spst	     rm -f ../$$name; ln -s $$dir ../$$name ; \
13617680Spst	    echo \
13717680Spst	    "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
13817680Spst	     (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
13917680Spst	    echo \
14017680Spst	    "rm -f ../$$name" ; \
14117680Spst	     rm -f ../$$name
14217680Spst
14317680Spstforce:	/tmp
14417680Spstdepend:	$(GENSRC) force
14517680Spst	./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
146