]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/netstat/Makefile
Remove spurious newline
[FreeBSD/FreeBSD.git] / usr.bin / netstat / Makefile
1 #       @(#)Makefile    8.1 (Berkeley) 6/12/93
2 # $FreeBSD$
3
4 .include <src.opts.mk>
5
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         nl_defs.h
10
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}
32
33 WARNS?= 3
34 CFLAGS+=-fno-strict-aliasing
35
36 CFLAGS+=-DIPSEC
37 CFLAGS+=-DSCTP
38
39 .if ${MK_INET_SUPPORT} != "no"
40 CFLAGS+=-DINET
41 .endif
42
43 .if ${MK_INET6_SUPPORT} != "no"
44 SRCS+=  inet6.c
45 CFLAGS+=-DINET6
46 .endif
47
48 .if ${MK_OFED} != "no"
49 CFLAGS+=-DSDP
50 .endif
51
52 .if ${MK_PF} != "no"
53 CFLAGS+=-DPF
54 .endif
55
56 BINGRP= kmem
57 BINMODE=2555
58 LIBADD= kvm memstat xo util
59
60 .if ${MK_NETGRAPH_SUPPORT} != "no"
61 SRCS+=  netgraph.c
62 LIBADD+=        netgraph
63 CFLAGS+=-DNETGRAPH
64 .endif
65
66 .include <bsd.prog.mk>