xref: /netbsd-src/external/bsd/ntp/lib/libntp/Makefile (revision 865c57e0098351fba0d2d2a97b33e7e0270e62c6)
1#	$NetBSD: Makefile,v 1.27 2023/06/03 09:09:04 lukem 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# Instead, use the date and time from ${IMPORTDATE_FILE}.
90#
91# The file should contain one line, like this:
92#	Fri Dec 27 19:28:17 EST 2013 (import)
93#
94.if ${MKREPRO:Uno} == "yes"
95IMPORTDATE_FILE := ${.PARSEDIR}/../../importdate
96MKREPRO_DATE != ${TOOL_AWK} '{printf "%3s %2d %4d", $$2, $$3, $$6}' \
97	<${IMPORTDATE_FILE} # "Mmm DD YYYY"
98MKREPRO_TIME != ${TOOL_AWK} '{print $$4}' \
99	<${IMPORTDATE_FILE} # "HH:MM:SS"
100CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
101CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
102.endif
103
104COPTS.timetoa.c+=	${CC_WNO_FORMAT_TRUNCATION}
105COPTS.socktoa.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
106COPTS.socktohost.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
107
108COPTS.a_md5encrypt.c+= -Wno-error=deprecated-declarations
109
110.include <bsd.lib.mk>
111