Home | History | Annotate | Line # | Download | only in ntp
      1  1.26  riastrad #	$NetBSD: Makefile.inc,v 1.26 2025/10/19 00:59:58 riastradh Exp $
      2   1.1    kardel 
      3   1.1    kardel .if !defined(NTP_MAKEFILE_INC)
      4   1.1    kardel NTP_MAKEFILE_INC=yes
      5   1.1    kardel 
      6   1.1    kardel USE_FORT?= yes	# network client/server
      7   1.1    kardel 
      8   1.9     joerg CWARNFLAGS+=	-Wno-missing-noreturn
      9   1.6     joerg CWARNFLAGS.clang+=	-Wno-unneeded-internal-declaration \
     10  1.12     joerg 			-Wno-parentheses -Wno-constant-logical-operand \
     11  1.12     joerg 			-Wno-error=unused-const-variable
     12   1.6     joerg 
     13  1.11    kardel WARNS?=	4
     14  1.11    kardel 
     15   1.1    kardel IDIST=		${NETBSDSRCDIR}/external/bsd/ntp/dist
     16   1.1    kardel NTP_SRCDIR=	${NETBSDSRCDIR}/external/bsd/ntp
     17  1.14  dholland NTP_HTMLDIR=	/usr/share/doc/reference/ref8
     18   1.1    kardel 
     19   1.1    kardel SYSCONFDIR=/etc
     20   1.1    kardel LOCALSTATEDIR=/var
     21   1.1    kardel 
     22   1.1    kardel CPPFLAGS+=-DHAVE_CONFIG_H
     23   1.1    kardel CPPFLAGS+=-I${NTP_SRCDIR}/include \
     24   1.1    kardel 	  -I${IDIST}/include \
     25  1.24  christos 	  -I${IDIST}/libntp/lib/isc/include \
     26  1.24  christos 	  -I${IDIST}/libntp/lib/isc/unix/include \
     27  1.24  christos 	  -I${IDIST}/libntp/lib/isc/nothreads/include
     28   1.1    kardel 
     29   1.1    kardel .if defined(PROG)
     30   1.1    kardel LIBNTP!=	cd ${.CURDIR}/../../lib/libntp && ${PRINTOBJDIR}
     31   1.1    kardel LIBISC!=	cd ${.CURDIR}/../../lib/libiscntp && ${PRINTOBJDIR}
     32   1.1    kardel LIBOPTS!=	cd ${.CURDIR}/../../lib/libopts && ${PRINTOBJDIR}
     33   1.1    kardel LIBPARSE!=	cd ${.CURDIR}/../../lib/libparse && ${PRINTOBJDIR}
     34   1.1    kardel 
     35   1.1    kardel LDADD+=		-L${LIBNTP} -lntp -L${LIBOPTS} -lopts
     36   1.1    kardel DPADD+=		${LIBNTP}/libntp.a ${LIBOPTS}/libopts.a
     37   1.1    kardel 
     38  1.26  riastrad LDADD+=		-lcrypto -lcrypt
     39  1.26  riastrad DPADD+=		${LIBCRYPTO} ${LIBCRYPT}
     40   1.1    kardel 
     41  1.15  christos .if ${MKMDNS:Uno} != "no"
     42   1.3    kardel CPPFLAGS+=-DHAVE_DNSREGISTRATION=1
     43   1.3    kardel LDADD+=-ldns_sd
     44   1.3    kardel .endif
     45   1.3    kardel 
     46   1.1    kardel SRCS+=	version.c
     47   1.1    kardel 
     48   1.1    kardel CLEANFILES+=version.c version.o
     49  1.22  christos version.c: ${LIBNTP}/libntp.a ${.CURDIR}/../../scripts/mkver
     50   1.1    kardel 	${_MKTARGET_CREATE}
     51   1.1    kardel 	${HOST_SH} ${.CURDIR}/../../scripts/mkver ${PROG} > /dev/null
     52   1.1    kardel 
     53   1.1    kardel .endif # defined(PROG)
     54   1.1    kardel 
     55  1.16  christos CPPFLAGS+=-DOPENSSL -DAUTOKEY -DUSE_OPENSSL_CRYPTO_RAND
     56   1.3    kardel 
     57  1.15  christos .if ${MKINET6:Uno} != "no"
     58   1.4    kardel CPPFLAGS+=-DWANT_IPV6
     59   1.4    kardel .else
     60   1.4    kardel CPPFLAGS+=-DISC_PLATFORM_NEEDIN6ADDRANY
     61   1.3    kardel .endif
     62   1.3    kardel 
     63   1.1    kardel .if exists(${.CURDIR}/../../Makefile.inc)
     64   1.1    kardel .include "${.CURDIR}/../../Makefile.inc"
     65   1.1    kardel .endif
     66   1.1    kardel 
     67  1.23     lukem COPTS.configfile.c+=		${CC_WNO_IMPLICIT_FALLTHROUGH}
     68  1.23     lukem COPTS.libopts.c+=		${CC_WNO_IMPLICIT_FALLTHROUGH}
     69  1.23     lukem COPTS.ntp_loopfilter.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
     70  1.23     lukem COPTS.refclock_ulink.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
     71  1.18       mrg 
     72  1.20  christos .SUFFIXES: .1 .5 .8 .1ntpdmdoc .5mdoc .1ntp-keygenmdoc .1ntpdcmdoc .1ntpqmdoc .1sntpmdoc
     73  1.20  christos 
     74  1.20  christos .5mdoc.5:
     75  1.20  christos 	${TOOL_SED} -e 's/5mdoc/5/g' < ${.IMPSRC} > ${.TARGET}
     76  1.20  christos 
     77  1.20  christos .1ntpdmdoc.8:
     78  1.20  christos 	${TOOL_SED} -e 's/1ntpdmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
     79  1.20  christos 
     80  1.20  christos .1ntp-keygenmdoc.8:
     81  1.20  christos 	${TOOL_SED} -e 's/1ntp-keygenmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
     82  1.20  christos 
     83  1.20  christos .1ntpdcmdoc.8:
     84  1.20  christos 	${TOOL_SED} -e 's/1ntpdcmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
     85  1.20  christos 
     86  1.20  christos .1ntpqmdoc.8:
     87  1.20  christos 	${TOOL_SED} -e 's/1ntpqmdoc/8/g' < ${.IMPSRC} > ${.TARGET}
     88  1.20  christos 
     89  1.20  christos .1sntpmdoc.1:
     90  1.20  christos 	${TOOL_SED} -e 's/1sntpmdoc/1/g' < ${.IMPSRC} > ${.TARGET}
     91   1.2  christos .endif
     92