mail(1): Invert calloc(3) argument order.
[freebsd-src.git] / usr.bin / netstat / Makefile
blob8bbce9031927289690189ea8c264ca1c27fc69d5
1 # @(#)Makefile 8.1 (Berkeley) 6/12/93
2 # $FreeBSD$
4 .include <src.opts.mk>
6 PROG= netstat
7 SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c nl_symbols.c route.c \
8 unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c \
9 flowtable.c nl_defs.h
11 nl_symbols.c: nlist_symbols
12 awk '\
13 BEGIN { \
14 print "#include <sys/param.h>"; \
15 print "#include <nlist.h>"; \
16 print "struct nlist nl[] = {"; \
17 } \
18 !/^\#/ { printf("\t{ .n_name = \"%s\" },\n", $$2); } \
19 END { print "\t{ .n_name = NULL },\n};" } \
20 ' < ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET}
21 nl_defs.h: nlist_symbols
22 awk '\
23 BEGIN { \
24 print "#include <nlist.h>"; \
25 print "extern struct nlist nl[];"; \
26 i = 0; \
27 } \
28 !/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
29 < ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET}
30 CLEANFILES+= nl_symbols.c nl_defs.h
31 CFLAGS+= -I${.OBJDIR}
33 WARNS?= 3
34 CFLAGS+=-fno-strict-aliasing
36 CFLAGS+=-DIPSEC
37 CFLAGS+=-DSCTP
39 .if ${MK_INET_SUPPORT} != "no"
40 CFLAGS+=-DINET
41 .endif
43 .if ${MK_INET6_SUPPORT} != "no"
44 SRCS+= inet6.c
45 CFLAGS+=-DINET6
46 .endif
48 .if ${MK_OFED} != "no"
49 CFLAGS+=-DSDP
50 .endif
52 .if ${MK_PF} != "no"
53 CFLAGS+=-DPF
54 .endif
56 BINGRP= kmem
57 BINMODE=2555
58 LIBADD= kvm memstat xo util
60 .if ${MK_NETGRAPH_SUPPORT} != "no"
61 SRCS+= netgraph.c
62 LIBADD+= netgraph
63 CFLAGS+=-DNETGRAPH
64 .endif
66 .include <bsd.prog.mk>