NetBSD/external/bsd/ntp/Makefile.inc
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00

73 lines
1.7 KiB
Makefile

# $NetBSD: Makefile.inc,v 1.6 2011/05/26 12:56:25 joerg Exp $
.if !defined(NTP_MAKEFILE_INC)
NTP_MAKEFILE_INC=yes
USE_FORT?= yes # network client/server
CWARNFLAGS.clang+= -Wno-unneeded-internal-declaration \
-Wno-format-security -Wno-array-bounds \
-Wno-parentheses -Wno-constant-logical-operand
WARNS?= 5
.include <bsd.own.mk>
IDIST= ${NETBSDSRCDIR}/external/bsd/ntp/dist
NTP_SRCDIR= ${NETBSDSRCDIR}/external/bsd/ntp
NTP_HTMLDIR= /usr/share/doc/html/ntp
SYSCONFDIR=/etc
LOCALSTATEDIR=/var
CPPFLAGS+=-DHAVE_CONFIG_H
CPPFLAGS+=-I${NTP_SRCDIR}/include \
-I${IDIST}/include \
-I${IDIST}/lib/isc/include \
-I${IDIST}/lib/isc/unix/include \
-I${IDIST}/lib/isc/nothreads/include
.if defined(PROG)
LIBNTP!= cd ${.CURDIR}/../../lib/libntp && ${PRINTOBJDIR}
LIBISC!= cd ${.CURDIR}/../../lib/libiscntp && ${PRINTOBJDIR}
LIBOPTS!= cd ${.CURDIR}/../../lib/libopts && ${PRINTOBJDIR}
LIBPARSE!= cd ${.CURDIR}/../../lib/libparse && ${PRINTOBJDIR}
LDADD+= -L${LIBNTP} -lntp -L${LIBOPTS} -lopts
DPADD+= ${LIBNTP}/libntp.a ${LIBOPTS}/libopts.a
.if (${MKCRYPTO} != "no")
LDADD+= -lcrypto -lcrypt
DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
.endif
.if ("${MKMDNS}" != "no")
CPPFLAGS+=-DHAVE_DNSREGISTRATION=1
LDADD+=-ldns_sd
.endif
SRCS+= version.c
CLEANFILES+=version.c version.o
version.c: ${LIBNTP}/libntp.a ${.CURDIR}/../../scripts/mkver ${.CURDIR}/../../importdate
${_MKTARGET_CREATE}
${HOST_SH} ${.CURDIR}/../../scripts/mkver ${PROG} > /dev/null
.endif # defined(PROG)
.if (${MKCRYPTO} != "no")
CPPFLAGS+=-DOPENSSL
.endif
.if ("${MKINET6}" != "no")
CPPFLAGS+=-DWANT_IPV6
.else
CPPFLAGS+=-DISC_PLATFORM_NEEDIN6ADDRANY
.endif
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif
.endif