1# $NetBSD: Makefile,v 1.17 2014/12/23 20:26:30 joerg 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 \ 43lib_strbuf.c \ 44machines.c \ 45mktime.c \ 46modetoa.c \ 47mstolfp.c \ 48msyslog.c \ 49netof.c \ 50ntp_calendar.c \ 51ntp_crypto_rnd.c \ 52ntp_intres.c \ 53ntp_libopts.c \ 54ntp_lineedit.c \ 55ntp_random.c \ 56ntp_rfc2553.c \ 57ntp_worker.c \ 58numtoa.c \ 59numtohost.c \ 60octtoint.c \ 61prettydate.c \ 62recvbuff.c \ 63refnumtoa.c \ 64snprintf.c \ 65socket.c \ 66socktoa.c \ 67socktohost.c \ 68ssl_init.c \ 69statestr.c \ 70strdup.c \ 71syssignal.c \ 72systime.c \ 73timetoa.c \ 74uglydate.c \ 75vint64ops.c \ 76work_fork.c \ 77work_thread.c \ 78ymd2yd.c 79 80CPPFLAGS+= -I${IDIST}/sntp/libopts 81 82.if ${HAVE_GCC:U} == 4 83COPTS.systime.c+= -Wno-uninitialized 84.else 85COPTS.msyslog.c+= -Wno-error=format-nonliteral 86.endif 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 104.include <bsd.lib.mk> 105