1#	$NetBSD: Makefile,v 1.36 2024/04/21 17:19:52 rillig Exp $
2
3LIBISPRIVATE=yes
4
5LIB=ntp
6
7.include <bsd.own.mk>
8
9.include "${.CURDIR}/../Makefile.inc"
10
11DIST=	${IDIST}/libntp 
12
13.PATH.c:	${DIST}
14
15SRCS= \
16a_md5encrypt.c \
17adjtime.c \
18atoint.c \
19atolfp.c \
20atouint.c \
21audio.c \
22authkeys.c \
23authreadkeys.c \
24authusekey.c \
25bsd_strerror.c \
26buftvtots.c \
27caljulian.c \
28caltontp.c \
29calyearstart.c \
30clocktime.c \
31clocktypes.c \
32decodenetnum.c \
33dofptoa.c \
34dolfptoa.c \
35emalloc.c \
36findconfig.c \
37getopt.c \
38hextoint.c \
39hextolfp.c \
40humandate.c \
41icom.c \
42iosignal.c \
43is_ip_address.c \
44lib_strbuf.c \
45libssl_compat.c \
46machines.c \
47mktime.c \
48modetoa.c \
49mstolfp.c \
50msyslog.c \
51netof.c \
52ntp_calendar.c \
53ntp_calgps.c \
54ntp_crypto_rnd.c \
55ntp_intres.c \
56ntp_libopts.c \
57ntp_lineedit.c \
58ntp_random.c \
59ntp_rfc2553.c \
60ntp_worker.c \
61numtoa.c \
62numtohost.c \
63octtoint.c \
64prettydate.c \
65recvbuff.c \
66refnumtoa.c \
67snprintf.c \
68socket.c \
69socktoa.c \
70socktohost.c \
71ssl_init.c \
72statestr.c \
73strdup.c \
74syssignal.c \
75systime.c \
76timespecops.c \
77timetoa.c \
78timexsup.c \
79uglydate.c \
80vint64ops.c \
81work_fork.c \
82work_thread.c \
83xsbprintf.c \
84ymd2yd.c
85
86CPPFLAGS+= -I${IDIST}/sntp/libopts
87
88# For MKREPRO, avoid using __DATE__ and __TIME__.
89.if ${MKREPRO:Uno} == "yes"
90MKREPRO_CPPFLAGS.ntp_calendar.c:= \
91	-DMKREPRO_DATE=\"${%b %e %Y:L:${:Ugmtime=${MKREPRO_TIMESTAMP}}:Q}\" \
92	-DMKREPRO_TIME=\"${%T:L:${:Ugmtime=${MKREPRO_TIMESTAMP}}:Q}\"
93CPPFLAGS.ntp_calendar.c += ${MKREPRO_CPPFLAGS.ntp_calendar.c}
94.endif
95
96COPTS.timetoa.c+=	${CC_WNO_FORMAT_TRUNCATION}
97COPTS.socktoa.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
98COPTS.socktohost.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
99
100COPTS.a_md5encrypt.c+= -Wno-error=deprecated-declarations
101
102.include <bsd.lib.mk>
103