07b202a847
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles. Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations) As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following: CC=clang CXX=clang++ CPP=clang-cpp MFC after: 2 weeks
48 lines
861 B
Makefile
48 lines
861 B
Makefile
# @(#)Makefile 8.1 (Berkeley) 6/12/93
|
|
# $FreeBSD$
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
PROG= netstat
|
|
SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c route.c \
|
|
unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c
|
|
|
|
WARNS?= 3
|
|
# XXX: Work around a clang false positive with format string warnings
|
|
# and ntohs macros (see LLVM PR 11313).
|
|
NO_WFORMAT.clang=
|
|
CFLAGS+=-fno-strict-aliasing
|
|
|
|
CFLAGS+=-DIPSEC
|
|
CFLAGS+=-DSCTP
|
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
|
SRCS+= inet6.c
|
|
CFLAGS+=-DINET6
|
|
.endif
|
|
|
|
.if ${MK_OFED} != "no"
|
|
CFLAGS+=-DSDP
|
|
.endif
|
|
|
|
BINGRP= kmem
|
|
BINMODE=2555
|
|
DPADD= ${LIBKVM} ${LIBMEMSTAT} ${LIBUTIL}
|
|
LDADD= -lkvm -lmemstat -lutil
|
|
|
|
.if ${MK_NETGRAPH_SUPPORT} != "no"
|
|
SRCS+= netgraph.c
|
|
DPADD+= ${LIBNETGRAPH}
|
|
LDADD+= -lnetgraph
|
|
CFLAGS+=-DNETGRAPH
|
|
.endif
|
|
|
|
.if ${MK_IPX_SUPPORT} != "no"
|
|
SRCS+= ipx.c
|
|
DPADD+= ${LIBIPX}
|
|
LDADD+= -lipx
|
|
CFLAGS+=-DIPX
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|