Makefile.in revision 17680
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#
2017680Spst# @(#) $Header: Makefile.in,v 1.195 96/07/16 23:52:06 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
3417680Spst#
3517680Spst# You shouldn't need to edit anything below here.
3617680Spst#
3717680Spst
3817680SpstCC = @CC@
3917680SpstCCOPT = @V_CCOPT@
4017680SpstINCLS = -I. @V_INCLS@
4117680SpstDEFS = @DEFS@ -DPPP -DHAVE_FDDI
4217680Spst
4317680Spst# Standard CFLAGS
4417680SpstCFLAGS = $(CCOPT) $(DEFS) $(INCLS)
4517680Spst
4617680Spst# Standard LIBS
4717680SpstLIBS = @LIBS@
4817680Spst
4917680SpstINSTALL = @INSTALL@
5017680Spst
5117680Spst# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
5217680Spst# Also, gcc does not remove the .o before forking 'as', which can be a
5317680Spst# problem if you don't own the file but can write to the directory.
5417680Spst.c.o:
5517680Spst	@rm -f $@
5617680Spst	$(CC) $(CFLAGS) -c $*.c
5717680Spst
5817680SpstCSRC =	tcpdump.c addrtoname.c \
5917680Spst	print-ether.c print-ip.c print-arp.c print-tcp.c \
6017680Spst	print-udp.c print-atalk.c print-domain.c print-tftp.c \
6117680Spst	print-bootp.c print-nfs.c print-icmp.c print-igrp.c \
6217680Spst	print-sl.c print-ppp.c print-rip.c print-snmp.c \
6317680Spst	print-ntp.c print-null.c print-egp.c print-ospf.c \
6417680Spst	print-fddi.c print-llc.c print-sunrpc.c print-wb.c \
6517680Spst	print-decnet.c print-isoclns.c print-ipx.c \
6617680Spst	print-atm.c print-dvmrp.c print-pim.c print-krb.c \
6717680Spst	util.c machdep.c bpf_dump.c parsenfsfh.c
6817680SpstLOCALSRC =
6917680SpstGENSRC = version.c
7017680Spst
7117680SpstSRC =	$(CSRC) $(GENSRC) $(LOCALSRC)
7217680Spst
7317680Spst# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
7417680Spst# hack the extra indirection
7517680SpstOBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) @LIBOBJS@
7617680SpstHDR =   addrtoname.h appletalk.h bootp.h decnet.h \
7717680Spst	ethertype.h extract.h fddi.h interface.h igrp.h ipx.h \
7817680Spst	llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h
7917680Spst
8017680SpstTAGHDR = \
8117680Spst	/usr/include/arpa/tftp.h \
8217680Spst	/usr/include/net/slip.h \
8317680Spst	/usr/include/netinet/if_ether.h \
8417680Spst	/usr/include/netinet/in.h \
8517680Spst	/usr/include/netinet/ip_icmp.h \
8617680Spst	/usr/include/netinet/tcp.h \
8717680Spst	/usr/include/netinet/udp.h \
8817680Spst	/usr/include/protocols/routed.h
8917680Spst
9017680SpstTAGFILES = $(SRC) $(HDR) $(TAGHDR)
9117680Spst
9217680SpstCLEANFILES = $(OBJ) tcpdump $(GENSRC)
9317680Spst
9417680Spsttcpdump: $(OBJ) @V_PCAPDEP@
9517680Spst	@rm -f $@
9617680Spst	$(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS)
9717680Spst
9817680Spstversion.o: version.c
9917680Spstversion.c: VERSION
10017680Spst	@rm -f $@
10117680Spst	sed -e 's/.*/char version[] = "&";/' VERSION > $@
10217680Spst
10317680Spstinstall: force
10417680Spst	$(INSTALL) -m 550 -o bin -g @V_GROUP@ tcpdump $(DESTDIR)$(BINDEST)
10517680Spst
10617680Spstinstall-man: force
10717680Spst	$(INSTALL) -m 444 -o bin -g bin tcpdump.1 $(DESTDIR)$(MANDEST)/man1
10817680Spst
10917680Spstlint:	$(GENSRC) force
11017680Spst	lint -hbxn $(SRC) | \
11117680Spst	    grep -v 'struct/union .* never defined' | \
11217680Spst	    grep -v 'possible pointer alignment problem'
11317680Spst
11417680Spstclean:
11517680Spst	rm -f $(CLEANFILES)
11617680Spst
11717680Spstdistclean:
11817680Spst	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
11917680Spst	    gnuc.h os-proto.h
12017680Spst
12117680Spsttags:	$(TAGFILES)
12217680Spst	ctags -wtd $(TAGFILES)
12317680Spst
12417680Spsttar:	force
12517680Spst	@cwd=`pwd` ; dir=`basename $$cwd` ; name=tcpdump-`cat VERSION` ; \
12617680Spst	    list="" ; tar="tar chFFf" ; \
12717680Spst	    for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
12817680Spst	    echo \
12917680Spst	    "rm -f ../$$name; ln -s $$dir ../$$name" ; \
13017680Spst	     rm -f ../$$name; ln -s $$dir ../$$name ; \
13117680Spst	    echo \
13217680Spst	    "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \
13317680Spst	     (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \
13417680Spst	    echo \
13517680Spst	    "rm -f ../$$name" ; \
13617680Spst	     rm -f ../$$name
13717680Spst
13817680Spstforce:	/tmp
13917680Spstdepend:	$(GENSRC) force
14017680Spst	./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
141