Expand PMF_FN_* macros.
[netbsd-mini2440.git] / usr.sbin / ntp / Makefile.inc
blobbcf5bca04bff9960bef04996e78de2d4784891c1
1 #       $NetBSD: Makefile.inc,v 1.19 2008/07/15 18:28:10 perry Exp $
3 .if !defined(NTP_MAKEFILE_INC)
5 WARNS?= 1       # XXX -Wcast-qual -Wshadow -Wsign-compare
7 NTP_MAKEFILE_INC=1
9 .include <bsd.own.mk>
11 USE_FORT?= yes  # network client/server
13 DIST=           ${NETBSDSRCDIR}/dist/ntp
14 NTP_HTMLDIR=    ${DIST}/html
16 CPPFLAGS+=      -I${.CURDIR}/../include -I${DIST}/include -I${DIST}/libopts -DHAVE_CONFIG_H
18 .if (${MKCRYPTO} != "no")
19 CPPFLAGS+=      -DOPENSSL
20 .endif
22 .if (${USE_INET6} != "no")
23 CPPFLAGS+=      -DWANT_IPV6
24 .else
25 CPPFLAGS+=      -DISC_PLATFORM_NEEDIN6ADDRANY
26 .endif
28 .if defined(PROG)
29 LIBNTP!=        cd ${.CURDIR}/../libntp && ${PRINTOBJDIR}
30 LIBISC!=        cd ${.CURDIR}/../libisc && ${PRINTOBJDIR}
31 LIBOPTS!=       cd ${.CURDIR}/../libopts && ${PRINTOBJDIR}
32 LDADD+=         -L${LIBNTP} -lntp -L${LIBOPTS} -lopts
33 DPADD+=         ${LIBNTP}/libntp.a ${LIBOPTS}/libopts.a
35 .if (${MKCRYPTO} != "no")
36 LDADD+=         -lcrypto -lcrypt
37 DPADD+=         ${LIBCRYPTO} ${LIBCRYPT}
38 .endif
40 SRCS+=  version.c
41 CLEANFILES+=version.c version.o
42 version.c: ${LIBNTP}/libntp.a ${.CURDIR}/../scripts/mkver
43         ${_MKTARGET_CREATE}
44         ${HOST_SH} ${.CURDIR}/../scripts/mkver ${PROG} > /dev/null
45 .endif # defined(PROG)
47 NTPSRCDIR?= ${PROG}
48 .PATH:          ${DIST}/${NTPSRCDIR}
50 .if exists(${.CURDIR}/../../Makefile.inc)
51 .include "${.CURDIR}/../../Makefile.inc"
52 .endif
54 .endif # !defined(NTP_MAKEFILE_INC)