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