1# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 2# The Regents of the University of California. All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that: (1) source code distributions 6# retain the above copyright notice and this paragraph in its entirety, (2) 7# distributions including binary code include the above copyright notice and 8# this paragraph in its entirety in the documentation or other materials 9# provided with the distribution, and (3) all advertising materials mentioning 10# features or use of this software display the following acknowledgement: 11# ``This product includes software developed by the University of California, 12# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 13# the University nor the names of its contributors may be used to endorse 14# or promote products derived from this software without specific prior 15# written permission. 16# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 17# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 18# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19# 20# @(#) $Header: Makefile.in,v 1.195 96/07/16 23:52:06 leres Exp $ (LBL) 21 22# 23# Various configurable paths (remember to edit Makefile.in, not Makefile) 24# 25 26# Top level hierarchy 27prefix = @prefix@ 28exec_prefix = @exec_prefix@ 29# Pathname of directory to install the binary 30BINDEST = @sbindir@ 31# Pathname of directory to install the man page 32MANDEST = @mandir@ 33 34# 35# You shouldn't need to edit anything below here. 36# 37 38CC = @CC@ 39CCOPT = @V_CCOPT@ 40INCLS = -I. @V_INCLS@ 41DEFS = @DEFS@ -DPPP -DHAVE_FDDI 42 43# Standard CFLAGS 44CFLAGS = $(CCOPT) $(DEFS) $(INCLS) 45 46# Standard LIBS 47LIBS = @LIBS@ 48 49INSTALL = @INSTALL@ 50 51# Explicitly define compilation rule since SunOS 4's make doesn't like gcc. 52# Also, gcc does not remove the .o before forking 'as', which can be a 53# problem if you don't own the file but can write to the directory. 54.c.o: 55 @rm -f $@ 56 $(CC) $(CFLAGS) -c $*.c 57 58CSRC = tcpdump.c addrtoname.c \ 59 print-ether.c print-ip.c print-arp.c print-tcp.c \ 60 print-udp.c print-atalk.c print-domain.c print-tftp.c \ 61 print-bootp.c print-nfs.c print-icmp.c print-igrp.c \ 62 print-sl.c print-ppp.c print-rip.c print-snmp.c \ 63 print-ntp.c print-null.c print-egp.c print-ospf.c \ 64 print-fddi.c print-llc.c print-sunrpc.c print-wb.c \ 65 print-decnet.c print-isoclns.c print-ipx.c \ 66 print-atm.c print-dvmrp.c print-pim.c print-krb.c \ 67 util.c machdep.c bpf_dump.c parsenfsfh.c 68LOCALSRC = 69GENSRC = version.c 70 71SRC = $(CSRC) $(GENSRC) $(LOCALSRC) 72 73# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot 74# hack the extra indirection 75OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) @LIBOBJS@ 76HDR = addrtoname.h appletalk.h bootp.h decnet.h \ 77 ethertype.h extract.h fddi.h interface.h igrp.h ipx.h \ 78 llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h 79 80TAGHDR = \ 81 /usr/include/arpa/tftp.h \ 82 /usr/include/net/slip.h \ 83 /usr/include/netinet/if_ether.h \ 84 /usr/include/netinet/in.h \ 85 /usr/include/netinet/ip_icmp.h \ 86 /usr/include/netinet/tcp.h \ 87 /usr/include/netinet/udp.h \ 88 /usr/include/protocols/routed.h 89 90TAGFILES = $(SRC) $(HDR) $(TAGHDR) 91 92CLEANFILES = $(OBJ) tcpdump $(GENSRC) 93 94tcpdump: $(OBJ) @V_PCAPDEP@ 95 @rm -f $@ 96 $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS) 97 98version.o: version.c 99version.c: VERSION 100 @rm -f $@ 101 sed -e 's/.*/char version[] = "&";/' VERSION > $@ 102 103install: force 104 $(INSTALL) -m 550 -o bin -g @V_GROUP@ tcpdump $(DESTDIR)$(BINDEST) 105 106install-man: force 107 $(INSTALL) -m 444 -o bin -g bin tcpdump.1 $(DESTDIR)$(MANDEST)/man1 108 109lint: $(GENSRC) force 110 lint -hbxn $(SRC) | \ 111 grep -v 'struct/union .* never defined' | \ 112 grep -v 'possible pointer alignment problem' 113 114clean: 115 rm -f $(CLEANFILES) 116 117distclean: 118 rm -f $(CLEANFILES) Makefile config.cache config.log config.status \ 119 gnuc.h os-proto.h 120 121tags: $(TAGFILES) 122 ctags -wtd $(TAGFILES) 123 124tar: force 125 @cwd=`pwd` ; dir=`basename $$cwd` ; name=tcpdump-`cat VERSION` ; \ 126 list="" ; tar="tar chFFf" ; \ 127 for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \ 128 echo \ 129 "rm -f ../$$name; ln -s $$dir ../$$name" ; \ 130 rm -f ../$$name; ln -s $$dir ../$$name ; \ 131 echo \ 132 "(cd .. ; $$tar - [lots of files]) | compress > /tmp/$$name.tar.Z" ; \ 133 (cd .. ; $$tar - $$list) | compress > /tmp/$$name.tar.Z ; \ 134 echo \ 135 "rm -f ../$$name" ; \ 136 rm -f ../$$name 137 138force: /tmp 139depend: $(GENSRC) force 140 ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC) 141