1 # $NetBSD: Makefile,v 1.13 2014/12/19 20:43:20 christos Exp $ 2 3 LIBISPRIVATE=yes 4 5 LIB=ntp 6 7 .include <bsd.own.mk> 8 9 .include "${.CURDIR}/../Makefile.inc" 10 11 DIST= ${IDIST}/libntp 12 13 .PATH.c: ${DIST} 14 15 SRCS= \ 16 a_md5encrypt.c \ 17 adjtime.c \ 18 atoint.c \ 19 atolfp.c \ 20 atouint.c \ 21 audio.c \ 22 authkeys.c \ 23 authreadkeys.c \ 24 authusekey.c \ 25 bsd_strerror.c \ 26 buftvtots.c \ 27 caljulian.c \ 28 caltontp.c \ 29 calyearstart.c \ 30 clocktime.c \ 31 clocktypes.c \ 32 decodenetnum.c \ 33 dofptoa.c \ 34 dolfptoa.c \ 35 emalloc.c \ 36 findconfig.c \ 37 getopt.c \ 38 hextoint.c \ 39 hextolfp.c \ 40 humandate.c \ 41 icom.c \ 42 iosignal.c \ 43 lib_strbuf.c \ 44 machines.c \ 45 mktime.c \ 46 modetoa.c \ 47 mstolfp.c \ 48 msyslog.c \ 49 netof.c \ 50 ntp_calendar.c \ 51 ntp_crypto_rnd.c \ 52 ntp_intres.c \ 53 ntp_libopts.c \ 54 ntp_lineedit.c \ 55 ntp_random.c \ 56 ntp_rfc2553.c \ 57 ntp_worker.c \ 58 numtoa.c \ 59 numtohost.c \ 60 octtoint.c \ 61 prettydate.c \ 62 recvbuff.c \ 63 refnumtoa.c \ 64 snprintf.c \ 65 socket.c \ 66 socktoa.c \ 67 socktohost.c \ 68 ssl_init.c \ 69 statestr.c \ 70 strdup.c \ 71 syssignal.c \ 72 systime.c \ 73 timetoa.c \ 74 uglydate.c \ 75 vint64ops.c \ 76 work_fork.c \ 77 work_thread.c \ 78 ymd2yd.c 79 80 CPPFLAGS+= -I${IDIST}/sntp/libopts 81 82 COPTS.msyslog.c+= -Wno-error=format-nonliteral 83 84 # For MKREPRO, avoid using __DATE__ and __TIME__. 85 # Instead, use the date and time from ${IMPORTDATE_FILE}. 86 # 87 # The file should contain one line, like this: 88 # Fri Dec 27 19:28:17 EST 2013 (import) 89 # 90 .if ${MKREPRO} == "yes" 91 IMPORTDATE_FILE := ${.PARSEDIR}/../../importdate 92 MKREPRO_DATE != ${TOOL_AWK} '{printf "%3s %2d %4d", $$2, $$3, $$6}' \ 93 <${IMPORTDATE_FILE} # "Mmm DD YYYY" 94 MKREPRO_TIME != ${TOOL_AWK} '{print $$4}' \ 95 <${IMPORTDATE_FILE} # "HH:MM:SS" 96 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\" 97 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\" 98 .endif 99 100 .include <bsd.lib.mk> 101