The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 1 | # Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 |
| 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. |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 19 | |
| 20 | # |
| 21 | # Various configurable paths (remember to edit Makefile.in, not Makefile) |
| 22 | # |
| 23 | |
| 24 | # Top level hierarchy |
| 25 | prefix = @prefix@ |
| 26 | exec_prefix = @exec_prefix@ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 27 | datarootdir = @datarootdir@ |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 28 | # Pathname of directory to install the binary |
| 29 | sbindir = @sbindir@ |
| 30 | # Pathname of directory to install the man page |
| 31 | mandir = @mandir@ |
| 32 | |
| 33 | # VPATH |
| 34 | srcdir = @srcdir@ |
| 35 | VPATH = @srcdir@ |
| 36 | |
| 37 | # |
| 38 | # You shouldn't need to edit anything below here. |
| 39 | # |
| 40 | |
| 41 | CC = @CC@ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 42 | AR = @AR@ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 43 | MKDEP = @MKDEP@ |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 44 | PROG = tcpdump |
| 45 | CCOPT = @V_CCOPT@ |
| 46 | INCLS = -I. @V_INCLS@ |
| 47 | DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@ |
| 48 | |
| 49 | # Standard CFLAGS |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 50 | CFLAGS = @CFLAGS@ |
| 51 | FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS) |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 52 | |
| 53 | # Standard LDFLAGS |
| 54 | LDFLAGS = @LDFLAGS@ |
| 55 | |
| 56 | # Standard LIBS |
| 57 | LIBS = @LIBS@ |
| 58 | |
| 59 | INSTALL = @INSTALL@ |
| 60 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
| 61 | INSTALL_DATA = @INSTALL_DATA@ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 62 | RANLIB = @RANLIB@ |
| 63 | |
| 64 | DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 65 | |
| 66 | # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. |
| 67 | # Also, gcc does not remove the .o before forking 'as', which can be a |
| 68 | # problem if you don't own the file but can write to the directory. |
| 69 | .c.o: |
| 70 | @rm -f $@ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 71 | $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 72 | |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 73 | CSRC = setsignal.c tcpdump.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 74 | |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 75 | LIBNETDISSECT_SRC=\ |
| 76 | addrtoname.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 77 | addrtostr.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 78 | af.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 79 | ascii_strcasecmp.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 80 | checksum.c \ |
| 81 | cpack.c \ |
| 82 | gmpls.c \ |
| 83 | gmt2local.c \ |
| 84 | in_cksum.c \ |
| 85 | ipproto.c \ |
| 86 | l2vpn.c \ |
| 87 | machdep.c \ |
| 88 | nlpid.c \ |
| 89 | oui.c \ |
| 90 | parsenfsfh.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 91 | print.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 92 | print-802_11.c \ |
| 93 | print-802_15_4.c \ |
| 94 | print-ah.c \ |
| 95 | print-ahcp.c \ |
| 96 | print-aodv.c \ |
| 97 | print-aoe.c \ |
| 98 | print-ap1394.c \ |
| 99 | print-arcnet.c \ |
| 100 | print-arp.c \ |
| 101 | print-ascii.c \ |
| 102 | print-atalk.c \ |
| 103 | print-atm.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 104 | print-babel.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 105 | print-beep.c \ |
| 106 | print-bfd.c \ |
| 107 | print-bgp.c \ |
| 108 | print-bootp.c \ |
| 109 | print-bt.c \ |
| 110 | print-calm-fast.c \ |
| 111 | print-carp.c \ |
| 112 | print-cdp.c \ |
| 113 | print-cfm.c \ |
| 114 | print-chdlc.c \ |
| 115 | print-cip.c \ |
| 116 | print-cnfp.c \ |
| 117 | print-dccp.c \ |
| 118 | print-decnet.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 119 | print-dhcp6.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 120 | print-domain.c \ |
| 121 | print-dtp.c \ |
| 122 | print-dvmrp.c \ |
| 123 | print-eap.c \ |
| 124 | print-egp.c \ |
| 125 | print-eigrp.c \ |
| 126 | print-enc.c \ |
| 127 | print-esp.c \ |
| 128 | print-ether.c \ |
| 129 | print-fddi.c \ |
| 130 | print-forces.c \ |
| 131 | print-fr.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 132 | print-frag6.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 133 | print-ftp.c \ |
| 134 | print-geneve.c \ |
| 135 | print-geonet.c \ |
| 136 | print-gre.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 137 | print-hncp.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 138 | print-hsrp.c \ |
| 139 | print-http.c \ |
| 140 | print-icmp.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 141 | print-icmp6.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 142 | print-igmp.c \ |
| 143 | print-igrp.c \ |
| 144 | print-ip.c \ |
| 145 | print-ip6.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 146 | print-ip6opts.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 147 | print-ipcomp.c \ |
| 148 | print-ipfc.c \ |
| 149 | print-ipnet.c \ |
| 150 | print-ipx.c \ |
| 151 | print-isakmp.c \ |
| 152 | print-isoclns.c \ |
| 153 | print-juniper.c \ |
| 154 | print-krb.c \ |
| 155 | print-l2tp.c \ |
| 156 | print-lane.c \ |
| 157 | print-ldp.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 158 | print-lisp.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 159 | print-llc.c \ |
| 160 | print-lldp.c \ |
| 161 | print-lmp.c \ |
| 162 | print-loopback.c \ |
| 163 | print-lspping.c \ |
| 164 | print-lwapp.c \ |
| 165 | print-lwres.c \ |
| 166 | print-m3ua.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 167 | print-medsa.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 168 | print-mobile.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 169 | print-mobility.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 170 | print-mpcp.c \ |
| 171 | print-mpls.c \ |
| 172 | print-mptcp.c \ |
| 173 | print-msdp.c \ |
| 174 | print-msnlb.c \ |
| 175 | print-nflog.c \ |
| 176 | print-nfs.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 177 | print-nsh.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 178 | print-ntp.c \ |
| 179 | print-null.c \ |
| 180 | print-olsr.c \ |
| 181 | print-openflow-1.0.c \ |
| 182 | print-openflow.c \ |
| 183 | print-ospf.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 184 | print-ospf6.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 185 | print-otv.c \ |
| 186 | print-pgm.c \ |
| 187 | print-pim.c \ |
| 188 | print-pktap.c \ |
| 189 | print-ppi.c \ |
| 190 | print-ppp.c \ |
| 191 | print-pppoe.c \ |
| 192 | print-pptp.c \ |
| 193 | print-radius.c \ |
| 194 | print-raw.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 195 | print-resp.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 196 | print-rip.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 197 | print-ripng.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 198 | print-rpki-rtr.c \ |
| 199 | print-rrcp.c \ |
| 200 | print-rsvp.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 201 | print-rt6.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 202 | print-rtsp.c \ |
| 203 | print-rx.c \ |
| 204 | print-sctp.c \ |
| 205 | print-sflow.c \ |
| 206 | print-sip.c \ |
| 207 | print-sl.c \ |
| 208 | print-sll.c \ |
| 209 | print-slow.c \ |
| 210 | print-smtp.c \ |
| 211 | print-snmp.c \ |
| 212 | print-stp.c \ |
| 213 | print-sunatm.c \ |
| 214 | print-sunrpc.c \ |
| 215 | print-symantec.c \ |
| 216 | print-syslog.c \ |
| 217 | print-tcp.c \ |
| 218 | print-telnet.c \ |
| 219 | print-tftp.c \ |
| 220 | print-timed.c \ |
| 221 | print-tipc.c \ |
| 222 | print-token.c \ |
| 223 | print-udld.c \ |
| 224 | print-udp.c \ |
| 225 | print-usb.c \ |
| 226 | print-vjc.c \ |
| 227 | print-vqp.c \ |
| 228 | print-vrrp.c \ |
| 229 | print-vtp.c \ |
| 230 | print-vxlan.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 231 | print-vxlan-gpe.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 232 | print-wb.c \ |
| 233 | print-zephyr.c \ |
| 234 | print-zeromq.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 235 | netdissect.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 236 | signature.c \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 237 | strtoaddr.c \ |
| 238 | util-print.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 239 | |
| 240 | LOCALSRC = @LOCALSRC@ |
| 241 | GENSRC = version.c |
| 242 | LIBOBJS = @LIBOBJS@ |
| 243 | |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 244 | LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS} |
| 245 | LIBNETDISSECT=libnetdissect.a |
| 246 | |
| 247 | |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 248 | SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC) |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 249 | |
| 250 | # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot |
| 251 | # hack the extra indirection |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 252 | OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ) |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 253 | HDR = \ |
| 254 | addrtoname.h \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 255 | addrtostr.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 256 | af.h \ |
| 257 | ah.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 258 | appletalk.h \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 259 | ascii_strcasecmp.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 260 | atm.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 261 | chdlc.h \ |
| 262 | cpack.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 263 | ether.h \ |
| 264 | ethertype.h \ |
| 265 | extract.h \ |
Elliott Hughes | cec480a | 2017-12-19 16:54:57 -0800 | [diff] [blame] | 266 | funcattrs.h \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 267 | getopt_long.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 268 | gmpls.h \ |
| 269 | gmt2local.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 270 | interface.h \ |
| 271 | ip.h \ |
| 272 | ip6.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 273 | ipproto.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 274 | l2vpn.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 275 | llc.h \ |
| 276 | machdep.h \ |
| 277 | mib.h \ |
| 278 | mpls.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 279 | nameser.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 280 | netdissect.h \ |
| 281 | nfs.h \ |
| 282 | nfsfh.h \ |
| 283 | nlpid.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 284 | openflow.h \ |
| 285 | ospf.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 286 | oui.h \ |
| 287 | pcap-missing.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 288 | ppp.h \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 289 | print.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 290 | rpc_auth.h \ |
| 291 | rpc_msg.h \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 292 | rpl.h \ |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 293 | setsignal.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 294 | signature.h \ |
| 295 | slcompress.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 296 | smb.h \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 297 | strtoaddr.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 298 | tcp.h \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 299 | netdissect-stdinc.h \ |
| 300 | timeval-operations.h \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 301 | udp.h |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 302 | |
| 303 | TAGHDR = \ |
| 304 | /usr/include/arpa/tftp.h \ |
| 305 | /usr/include/net/if_arp.h \ |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 306 | /usr/include/netinet/if_ether.h \ |
| 307 | /usr/include/netinet/in.h \ |
| 308 | /usr/include/netinet/ip_icmp.h \ |
| 309 | /usr/include/netinet/tcp.h \ |
| 310 | /usr/include/netinet/udp.h \ |
| 311 | /usr/include/protocols/routed.h |
| 312 | |
| 313 | TAGFILES = $(SRC) $(HDR) $(TAGHDR) |
| 314 | |
| 315 | CLEANFILES = $(PROG) $(OBJ) $(GENSRC) |
| 316 | |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 317 | EXTRA_DIST = \ |
| 318 | CHANGES \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 319 | CONTRIBUTING \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 320 | CREDITS \ |
| 321 | INSTALL.txt \ |
| 322 | LICENSE \ |
| 323 | Makefile.in \ |
| 324 | Makefile-devel-adds \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 325 | PLATFORMS \ |
| 326 | README \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 327 | README.md \ |
| 328 | Readme.Win32 \ |
| 329 | VERSION \ |
| 330 | aclocal.m4 \ |
| 331 | atime.awk \ |
| 332 | bpf_dump.c \ |
| 333 | config.guess \ |
| 334 | config.h.in \ |
| 335 | config.sub \ |
| 336 | configure \ |
| 337 | configure.in \ |
| 338 | install-sh \ |
| 339 | lbl/os-osf4.h \ |
| 340 | lbl/os-solaris2.h \ |
| 341 | lbl/os-sunos4.h \ |
| 342 | lbl/os-ultrix4.h \ |
| 343 | makemib \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 344 | missing/dlnames.c \ |
| 345 | missing/datalinks.c \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 346 | missing/getopt_long.c \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 347 | missing/snprintf.c \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 348 | missing/strdup.c \ |
| 349 | missing/strlcat.c \ |
| 350 | missing/strlcpy.c \ |
| 351 | missing/strsep.c \ |
| 352 | mkdep \ |
| 353 | packetdat.awk \ |
| 354 | pcap_dump_ftell.c \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 355 | print-pflog.c \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 356 | print-smb.c \ |
| 357 | send-ack.awk \ |
| 358 | smbutil.c \ |
| 359 | stime.awk \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 360 | tcpdump.1.in \ |
| 361 | vfprintf.c \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 362 | win32/prj/GNUmakefile \ |
| 363 | win32/prj/WinDump.dsp \ |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 364 | win32/prj/WinDump.dsw \ |
| 365 | win32/prj/WinDump.sln \ |
| 366 | win32/prj/WinDump.vcproj \ |
| 367 | win32/src/ether_ntohost.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 368 | |
| 369 | TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print` |
| 370 | |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 371 | all: $(PROG) $(LIBNETDISSECT) |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 372 | |
| 373 | $(PROG): $(OBJ) @V_PCAPDEP@ |
| 374 | @rm -f $@ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 375 | $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) |
| 376 | |
| 377 | $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) |
| 378 | @rm -f $@ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 379 | $(AR) cr $@ $(LIBNETDISSECT_OBJ) |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 380 | $(RANLIB) $@ |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 381 | |
| 382 | datalinks.o: $(srcdir)/missing/datalinks.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 383 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 384 | dlnames.o: $(srcdir)/missing/dlnames.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 385 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 386 | getopt_long.o: $(srcdir)/missing/getopt_long.c |
| 387 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 388 | snprintf.o: $(srcdir)/missing/snprintf.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 389 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 390 | strdup.o: $(srcdir)/missing/strdup.c |
| 391 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 392 | strlcat.o: $(srcdir)/missing/strlcat.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 393 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 394 | strlcpy.o: $(srcdir)/missing/strlcpy.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 395 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 396 | strsep.o: $(srcdir)/missing/strsep.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 397 | $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 398 | |
| 399 | version.o: version.c |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 400 | $(CC) $(FULL_CFLAGS) -c version.c |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 401 | |
| 402 | version.c: $(srcdir)/VERSION |
| 403 | @rm -f $@ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 404 | if grep GIT ${srcdir}/VERSION >/dev/null; then \ |
| 405 | read ver <${srcdir}/VERSION; \ |
| 406 | echo $$ver | tr -d '\012'; \ |
| 407 | date +_%Y_%m_%d; \ |
| 408 | else \ |
| 409 | cat ${srcdir}/VERSION; \ |
| 410 | fi | sed -e 's/.*/const char version[] = "&";/' > $@ |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 411 | |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 412 | install: all |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 413 | [ -d $(DESTDIR)$(sbindir) ] || \ |
| 414 | (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir)) |
| 415 | $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 416 | $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION` |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 417 | [ -d $(DESTDIR)$(mandir)/man1 ] || \ |
| 418 | (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1) |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 419 | $(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1 |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 420 | |
| 421 | uninstall: |
| 422 | rm -f $(DESTDIR)$(sbindir)/$(PROG) |
| 423 | rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1 |
| 424 | |
| 425 | lint: $(GENSRC) |
| 426 | lint -hbxn $(SRC) | \ |
| 427 | grep -v 'struct/union .* never defined' | \ |
| 428 | grep -v 'possible pointer alignment problem' |
| 429 | |
| 430 | clean: |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 431 | rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 432 | |
| 433 | distclean: |
| 434 | rm -f $(CLEANFILES) Makefile config.cache config.log config.status \ |
Elliott Hughes | 892a68b | 2015-10-19 14:43:53 -0700 | [diff] [blame] | 435 | config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \ |
| 436 | libnetdissect.a tests/.failed tests/.passed \ |
| 437 | tests/failure-outputs.txt |
| 438 | rm -rf autom4te.cache tests/DIFF tests/NEW |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 439 | |
| 440 | check: tcpdump |
| 441 | (cd tests && ./TESTrun.sh) |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 442 | |
Elliott Hughes | e2e3bd1 | 2017-05-15 10:59:29 -0700 | [diff] [blame] | 443 | extags: $(TAGFILES) |
| 444 | ctags $(TAGFILES) |
| 445 | |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 446 | tags: $(TAGFILES) |
| 447 | ctags -wtd $(TAGFILES) |
| 448 | |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 449 | TAGS: $(TAGFILES) |
| 450 | etags $(TAGFILES) |
| 451 | |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 452 | releasetar: |
| 453 | @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \ |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 454 | mkdir $$name; \ |
| 455 | tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) $(TEST_DIST) | (cd $$name; tar xf -); \ |
| 456 | tar -c -z -f $$name.tar.gz $$name; \ |
| 457 | rm -rf $$name |
| 458 | |
| 459 | testlist: |
| 460 | echo $(TEST_DIST) |
The Android Open Source Project | 2949f58 | 2009-03-03 19:30:46 -0800 | [diff] [blame] | 461 | |
| 462 | depend: $(GENSRC) |
JP Abgrall | 53f17a9 | 2014-02-12 14:02:41 -0800 | [diff] [blame] | 463 | $(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC) |