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