1994-05-27 08:33:43 -04:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 6/12/93
|
2001-12-10 16:13:08 -05:00
|
|
|
# $FreeBSD$
|
1994-05-27 08:33:43 -04:00
|
|
|
|
2014-05-06 00:22:01 -04:00
|
|
|
.include <src.opts.mk>
|
2006-03-17 13:54:44 -05:00
|
|
|
|
1994-05-27 08:33:43 -04:00
|
|
|
PROG= netstat
|
2015-09-02 14:51:36 -04:00
|
|
|
SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c nl_symbols.c route.c \
|
2020-10-03 06:47:17 -04:00
|
|
|
unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c common.c nhops.c nhgrp.c \
|
2017-07-27 09:03:36 -04:00
|
|
|
nl_defs.h
|
2015-09-02 14:51:36 -04:00
|
|
|
|
|
|
|
|
nl_symbols.c: nlist_symbols
|
|
|
|
|
awk '\
|
|
|
|
|
BEGIN { \
|
|
|
|
|
print "#include <sys/param.h>"; \
|
|
|
|
|
print "#include <nlist.h>"; \
|
|
|
|
|
print "struct nlist nl[] = {"; \
|
|
|
|
|
} \
|
|
|
|
|
!/^\#/ { printf("\t{ .n_name = \"%s\" },\n", $$2); } \
|
|
|
|
|
END { print "\t{ .n_name = NULL },\n};" } \
|
|
|
|
|
' < ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET}
|
|
|
|
|
nl_defs.h: nlist_symbols
|
|
|
|
|
awk '\
|
|
|
|
|
BEGIN { \
|
|
|
|
|
print "#include <nlist.h>"; \
|
|
|
|
|
print "extern struct nlist nl[];"; \
|
|
|
|
|
i = 0; \
|
|
|
|
|
} \
|
|
|
|
|
!/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
|
|
|
|
|
< ${.ALLSRC} > ${.TARGET} || rm -f ${.TARGET}
|
|
|
|
|
CLEANFILES+= nl_symbols.c nl_defs.h
|
|
|
|
|
CFLAGS+= -I${.OBJDIR}
|
2005-01-23 07:29:46 -05:00
|
|
|
|
2006-07-28 12:16:40 -04:00
|
|
|
WARNS?= 3
|
2007-11-19 21:07:30 -05:00
|
|
|
CFLAGS+=-fno-strict-aliasing
|
2005-01-23 07:29:46 -05:00
|
|
|
|
2000-07-04 12:26:46 -04:00
|
|
|
CFLAGS+=-DIPSEC
|
2007-06-09 09:44:09 -04:00
|
|
|
CFLAGS+=-DSCTP
|
2006-07-28 07:09:21 -04:00
|
|
|
|
2012-07-16 02:43:04 -04:00
|
|
|
.if ${MK_INET_SUPPORT} != "no"
|
|
|
|
|
CFLAGS+=-DINET
|
|
|
|
|
.endif
|
|
|
|
|
|
2007-06-10 02:18:04 -04:00
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
|
|
|
|
SRCS+= inet6.c
|
|
|
|
|
CFLAGS+=-DINET6
|
|
|
|
|
.endif
|
1996-06-07 20:20:42 -04:00
|
|
|
|
2011-03-21 05:58:24 -04:00
|
|
|
.if ${MK_OFED} != "no"
|
|
|
|
|
CFLAGS+=-DSDP
|
|
|
|
|
.endif
|
|
|
|
|
|
2013-10-29 13:38:13 -04:00
|
|
|
.if ${MK_PF} != "no"
|
|
|
|
|
CFLAGS+=-DPF
|
|
|
|
|
.endif
|
|
|
|
|
|
1994-05-27 08:33:43 -04:00
|
|
|
BINGRP= kmem
|
|
|
|
|
BINMODE=2555
|
2015-08-24 12:26:20 -04:00
|
|
|
LIBADD= kvm memstat xo util
|
2008-09-21 18:02:26 -04:00
|
|
|
|
|
|
|
|
.if ${MK_NETGRAPH_SUPPORT} != "no"
|
|
|
|
|
SRCS+= netgraph.c
|
2014-11-25 09:29:10 -05:00
|
|
|
LIBADD+= netgraph
|
2008-09-21 18:02:26 -04:00
|
|
|
CFLAGS+=-DNETGRAPH
|
|
|
|
|
.endif
|
1994-05-27 08:33:43 -04:00
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|