]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/netstat/Makefile
libfido2: update to 1.13.0
[FreeBSD/FreeBSD.git] / usr.bin / netstat / Makefile
1 #       @(#)Makefile    8.1 (Berkeley) 6/12/93
2
3 .include <src.opts.mk>
4
5 PROG=   netstat
6 SRCS=   if.c inet.c main.c mbuf.c mroute.c netisr.c nl_symbols.c route.c \
7         unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c common.c nhops.c nhgrp.c \
8         nl_defs.h
9
10 nl_symbols.c: nlist_symbols
11         awk '\
12             BEGIN { \
13                 print "#include <sys/param.h>"; \
14                 print "#include <nlist.h>"; \
15                 print "struct nlist nl[] = {"; \
16             } \
17             !/^\#/ { printf("\t{ .n_name = \"%s\" },\n", $$2); } \
18             END { print "\t{ .n_name = NULL },\n};" } \
19             ' < ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET}
20 nl_defs.h: nlist_symbols
21         awk '\
22             BEGIN { \
23                 print "#include <nlist.h>"; \
24                 print "extern struct nlist nl[];"; \
25                 i = 0; \
26             } \
27             !/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
28             < ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET}
29 CLEANFILES+=    nl_symbols.c nl_defs.h
30 CFLAGS+=        -I${.OBJDIR}
31
32 WARNS?= 3
33 CFLAGS+=-fno-strict-aliasing
34
35 CFLAGS+=-DIPSEC
36 CFLAGS+=-DSCTP
37
38 .if ${MK_INET_SUPPORT} != "no"
39 CFLAGS+=-DINET
40 .endif
41
42 .if ${MK_INET6_SUPPORT} != "no"
43 SRCS+=  inet6.c
44 CFLAGS+=-DINET6
45 .endif
46
47 .if ${MK_OFED} != "no"
48 CFLAGS+=-DSDP
49 .endif
50
51 .if ${MK_PF} != "no"
52 CFLAGS+=-DPF
53 .endif
54
55 BINGRP= kmem
56 BINMODE=2555
57 LIBADD= kvm memstat xo util
58
59 .if ${MK_NETGRAPH_SUPPORT} != "no"
60 SRCS+=  netgraph.c
61 LIBADD+=        netgraph
62 CFLAGS+=-DNETGRAPH
63 .endif
64
65 .if ${MK_NETLINK_SUPPORT} != "no"
66 SRCS+=  route_netlink.c
67 .else
68 CFLAGS+=-DWITHOUT_NETLINK
69 .endif
70
71 .if ${MK_JAIL} != "no" && !defined(RESCUE)
72 CFLAGS+= -DJAIL
73 LIBADD+= jail
74 .endif
75
76 .include <bsd.prog.mk>