1NULL = 2BUILT_SOURCES = 3CLEANFILES = 4 5std_unity_list = \ 6 $(abs_top_srcdir)/sntp/unity/auto/generate_test_runner.rb \ 7 $(abs_srcdir)/testconf.yml \ 8 $(NULL) 9 10run_unity = ruby $(std_unity_list) 11 12EXTRA_DIST = \ 13 testconf.yml \ 14 $(NULL) 15 16check_PROGRAMS = \ 17 test-a_md5encrypt \ 18 test-atoint \ 19 test-atouint \ 20 test-authkeys \ 21 test-buftvtots \ 22 test-calendar \ 23 test-caljulian \ 24 test-caltontp \ 25 test-calyearstart \ 26 test-clocktime \ 27 test-decodenetnum \ 28 test-hextoint \ 29 test-hextolfp \ 30 test-humandate \ 31 test-lfpfunc \ 32 test-lfptostr \ 33 test-modetoa \ 34 test-msyslog \ 35 test-netof \ 36 test-numtoa \ 37 test-numtohost \ 38 test-octtoint \ 39 test-prettydate \ 40 test-recvbuff \ 41 test-refidsmear \ 42 test-refnumtoa \ 43 test-sbprintf \ 44 test-sfptostr \ 45 test-socktoa \ 46 test-ssl_init \ 47 test-statestr \ 48 test-strtolfp \ 49 test-timespecops \ 50 test-timevalops \ 51 test-tsafememcmp \ 52 test-tstotv \ 53 test-tvtots \ 54 test-uglydate \ 55 test-vi64ops \ 56 test-ymd2yd \ 57 $(NULL) 58 59LDADD = \ 60 $(top_builddir)/sntp/unity/libunity.a \ 61 $(top_builddir)/libntp/libntp.a \ 62 $(LDADD_LIBNTP) \ 63 $(PTHREAD_LIBS) \ 64 $(LDADD_NTP) \ 65 $(LIBM) \ 66 $(NULL) 67 68AM_CFLAGS = $(CFLAGS_NTP) 69AM_CFLAGS += $(NTP_HARD_CFLAGS) 70 71AM_CPPFLAGS = $(NTP_INCS) 72AM_CPPFLAGS += -I$(top_srcdir)/sntp 73AM_CPPFLAGS += $(CPPFLAGS_NTP) 74AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H 75AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity 76AM_CPPFLAGS += $(NTP_HARD_CPPFLAGS) 77 78AM_LDFLAGS = $(LDFLAGS_NTP) 79AM_LDFLAGS += $(NTP_HARD_LDFLAGS) 80 81BUILT_SOURCES += \ 82 $(srcdir)/run-a_md5encrypt.c \ 83 $(srcdir)/run-atoint.c \ 84 $(srcdir)/run-atouint.c \ 85 $(srcdir)/run-authkeys.c \ 86 $(srcdir)/run-buftvtots.c \ 87 $(srcdir)/run-calendar.c \ 88 $(srcdir)/run-caljulian.c \ 89 $(srcdir)/run-caltontp.c \ 90 $(srcdir)/run-calyearstart.c \ 91 $(srcdir)/run-clocktime.c \ 92 $(srcdir)/run-decodenetnum.c \ 93 $(srcdir)/run-hextoint.c \ 94 $(srcdir)/run-hextolfp.c \ 95 $(srcdir)/run-humandate.c \ 96 $(srcdir)/run-lfpfunc.c \ 97 $(srcdir)/run-lfptostr.c \ 98 $(srcdir)/run-modetoa.c \ 99 $(srcdir)/run-msyslog.c \ 100 $(srcdir)/run-netof.c \ 101 $(srcdir)/run-numtoa.c \ 102 $(srcdir)/run-numtohost.c \ 103 $(srcdir)/run-octtoint.c \ 104 $(srcdir)/run-prettydate.c \ 105 $(srcdir)/run-recvbuff.c \ 106 $(srcdir)/run-refidsmear.c \ 107 $(srcdir)/run-refnumtoa.c \ 108 $(srcdir)/run-sbprintf.c \ 109 $(srcdir)/run-sfptostr.c \ 110 $(srcdir)/run-socktoa.c \ 111 $(srcdir)/run-ssl_init.c \ 112 $(srcdir)/run-statestr.c \ 113 $(srcdir)/run-strtolfp.c \ 114 $(srcdir)/run-timevalops.c \ 115 $(srcdir)/run-timespecops.c \ 116 $(srcdir)/run-tsafememcmp.c \ 117 $(srcdir)/run-tstotv.c \ 118 $(srcdir)/run-tvtots.c \ 119 $(srcdir)/run-uglydate.c \ 120 $(srcdir)/run-vi64ops.c \ 121 $(srcdir)/run-ymd2yd.c \ 122 $(NULL) 123 124noinst_HEADERS = \ 125 lfptest.h \ 126 sockaddrtest.h \ 127 test-libntp.h \ 128 $(NULL) 129 130### 131 132test_a_md5encrypt_SOURCES = \ 133 a_md5encrypt.c \ 134 run-a_md5encrypt.c \ 135 $(NULL) 136 137$(srcdir)/run-a_md5encrypt.c: $(srcdir)/a_md5encrypt.c $(std_unity_list) 138 $(run_unity) $< $@ 139 140### 141 142test_atoint_SOURCES = \ 143 atoint.c \ 144 run-atoint.c \ 145 $(NULL) 146 147$(srcdir)/run-atoint.c: $(srcdir)/atoint.c $(std_unity_list) 148 $(run_unity) $< $@ 149 150### 151 152test_atouint_SOURCES = \ 153 atouint.c \ 154 run-atouint.c \ 155 $(NULL) 156 157$(srcdir)/run-atouint.c: $(srcdir)/atouint.c $(std_unity_list) 158 $(run_unity) $< $@ 159 160### 161 162test_authkeys_SOURCES = \ 163 authkeys.c \ 164 run-authkeys.c \ 165 $(NULL) 166 167$(srcdir)/run-authkeys.c: $(srcdir)/authkeys.c $(std_unity_list) 168 $(run_unity) $< $@ 169 170### 171 172test_buftvtots_SOURCES = \ 173 buftvtots.c \ 174 run-buftvtots.c \ 175 lfptest.c \ 176 $(NULL) 177 178$(srcdir)/run-buftvtots.c: $(srcdir)/buftvtots.c $(std_unity_list) 179 $(run_unity) $< $@ 180 181### 182 183test_calendar_SOURCES = \ 184 calendar.c \ 185 run-calendar.c \ 186 test-libntp.c \ 187 $(NULL) 188 189$(srcdir)/run-calendar.c: $(srcdir)/calendar.c $(std_unity_list) 190 $(run_unity) $< $@ 191 192### 193 194test_caltontp_CFLAGS = \ 195 $(CFLAGS_LIBEVENT) \ 196 $(AM_CFLAGS) \ 197 $(NULL) 198 199test_caltontp_SOURCES = \ 200 caltontp.c \ 201 run-caltontp.c \ 202 $(NULL) 203 204$(srcdir)/run-caltontp.c: $(srcdir)/caltontp.c $(std_unity_list) 205 $(run_unity) $< $@ 206 207### 208 209test_caljulian_CFLAGS = \ 210 $(CFLAGS_LIBEVENT) \ 211 $(AM_CFLAGS) \ 212 $(NULL) 213 214test_caljulian_SOURCES = \ 215 caljulian.c \ 216 run-caljulian.c \ 217 test-libntp.c \ 218 $(NULL) 219 220$(srcdir)/run-caljulian.c: $(srcdir)/caljulian.c $(std_unity_list) 221 $(run_unity) $< $@ 222 223### 224 225test_calyearstart_SOURCES = \ 226 calyearstart.c \ 227 run-calyearstart.c \ 228 test-libntp.c \ 229 $(NULL) 230 231$(srcdir)/run-calyearstart.c: $(srcdir)/calyearstart.c $(std_unity_list) 232 $(run_unity) $< $@ 233 234### 235 236test_clocktime_SOURCES = \ 237 clocktime.c \ 238 run-clocktime.c \ 239 test-libntp.c \ 240 $(NULL) 241 242$(srcdir)/run-clocktime.c: $(srcdir)/clocktime.c $(std_unity_list) 243 $(run_unity) $< $@ 244 245### 246 247test_decodenetnum_CFLAGS = \ 248 $(CFLAGS_LIBEVENT) \ 249 $(AM_CFLAGS) \ 250 $(NULL) 251 252test_decodenetnum_SOURCES = \ 253 decodenetnum.c \ 254 run-decodenetnum.c \ 255 sockaddrtest.c \ 256 $(NULL) 257 258$(srcdir)/run-decodenetnum.c: $(srcdir)/decodenetnum.c $(std_unity_list) 259 $(run_unity) $< $@ 260 261### 262 263test_hextoint_SOURCES = \ 264 hextoint.c \ 265 run-hextoint.c \ 266 $(NULL) 267 268$(srcdir)/run-hextoint.c: $(srcdir)/hextoint.c $(std_unity_list) 269 $(run_unity) $< $@ 270 271### 272 273test_hextolfp_SOURCES = \ 274 hextolfp.c \ 275 run-hextolfp.c \ 276 lfptest.c \ 277 $(NULL) 278 279$(srcdir)/run-hextolfp.c: $(srcdir)/hextolfp.c $(std_unity_list) 280 $(run_unity) $< $@ 281 282### 283 284test_humandate_SOURCES = \ 285 humandate.c \ 286 run-humandate.c \ 287 $(NULL) 288 289$(srcdir)/run-humandate.c: $(srcdir)/humandate.c $(std_unity_list) 290 $(run_unity) $< $@ 291 292### 293 294test_lfpfunc_SOURCES = \ 295 lfpfunc.c \ 296 run-lfpfunc.c \ 297 $(NULL) 298 299$(srcdir)/run-lfpfunc.c: $(srcdir)/lfpfunc.c $(std_unity_list) 300 $(run_unity) $< $@ 301 302### 303 304test_lfptostr_SOURCES = \ 305 lfptostr.c \ 306 run-lfptostr.c \ 307 $(NULL) 308 309$(srcdir)/run-lfptostr.c: $(srcdir)/lfptostr.c $(std_unity_list) 310 $(run_unity) $< $@ 311 312### 313 314test_modetoa_SOURCES = \ 315 modetoa.c \ 316 run-modetoa.c \ 317 $(NULL) 318 319$(srcdir)/run-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list) 320 $(run_unity) $< $@ 321 322### 323 324test_msyslog_SOURCES = \ 325 msyslog.c \ 326 run-msyslog.c \ 327 $(NULL) 328 329$(srcdir)/run-msyslog.c: $(srcdir)/msyslog.c $(std_unity_list) 330 $(run_unity) $< $@ 331 332### 333 334test_netof_SOURCES = \ 335 netof.c \ 336 run-netof.c \ 337 sockaddrtest.c \ 338 $(NULL) 339 340$(srcdir)/run-netof.c: $(srcdir)/netof.c $(std_unity_list) 341 $(run_unity) $< $@ 342 343### 344 345test_numtoa_SOURCES = \ 346 numtoa.c \ 347 run-numtoa.c \ 348 $(NULL) 349 350$(srcdir)/run-numtoa.c: $(srcdir)/numtoa.c $(std_unity_list) 351 $(run_unity) $< $@ 352 353### 354 355test_numtohost_SOURCES = \ 356 numtohost.c \ 357 run-numtohost.c \ 358 $(NULL) 359 360$(srcdir)/run-numtohost.c: $(srcdir)/numtohost.c $(std_unity_list) 361 $(run_unity) $< $@ 362 363### 364 365test_octtoint_SOURCES = \ 366 octtoint.c \ 367 run-octtoint.c \ 368 $(NULL) 369 370$(srcdir)/run-octtoint.c: $(srcdir)/octtoint.c $(std_unity_list) 371 $(run_unity) $< $@ 372 373### 374 375test_prettydate_SOURCES = \ 376 prettydate.c \ 377 run-prettydate.c \ 378 $(NULL) 379 380$(srcdir)/run-prettydate.c: $(srcdir)/prettydate.c $(std_unity_list) 381 $(run_unity) $< $@ 382 383### 384 385test_recvbuff_SOURCES = \ 386 recvbuff.c \ 387 run-recvbuff.c \ 388 $(NULL) 389 390$(srcdir)/run-recvbuff.c: $(srcdir)/recvbuff.c $(std_unity_list) 391 $(run_unity) $< $@ 392 393### 394 395test_refidsmear_SOURCES = \ 396 refidsmear.c \ 397 run-refidsmear.c \ 398 $(NULL) 399 400$(srcdir)/run-refidsmear.c: $(srcdir)/refidsmear.c $(std_unity_list) 401 $(run_unity) $< $@ 402 403### 404 405test_refnumtoa_SOURCES = \ 406 refnumtoa.c \ 407 run-refnumtoa.c \ 408 $(NULL) 409 410$(srcdir)/run-refnumtoa.c: $(srcdir)/refnumtoa.c $(std_unity_list) 411 $(run_unity) $< $@ 412 413### 414 415test_sbprintf_SOURCES = \ 416 sbprintf.c \ 417 run-sbprintf.c \ 418 $(NULL) 419 420$(srcdir)/run-sbprintf.c: $(srcdir)/sbprintf.c $(std_unity_list) 421 $(run_unity) $< $@ 422 423### 424 425test_sfptostr_SOURCES = \ 426 sfptostr.c \ 427 run-sfptostr.c \ 428 $(NULL) 429 430$(srcdir)/run-sfptostr.c: $(srcdir)/sfptostr.c $(std_unity_list) 431 $(run_unity) $< $@ 432 433### 434 435test_socktoa_SOURCES = \ 436 socktoa.c \ 437 run-socktoa.c \ 438 sockaddrtest.c \ 439 $(NULL) 440 441$(srcdir)/run-socktoa.c: $(srcdir)/socktoa.c $(std_unity_list) 442 $(run_unity) $< $@ 443 444### 445 446test_ssl_init_SOURCES = \ 447 ssl_init.c \ 448 run-ssl_init.c \ 449 $(NULL) 450 451$(srcdir)/run-ssl_init.c: $(srcdir)/ssl_init.c $(std_unity_list) 452 $(run_unity) $< $@ 453 454### 455 456test_statestr_SOURCES = \ 457 statestr.c \ 458 run-statestr.c \ 459 $(NULL) 460 461$(srcdir)/run-statestr.c: $(srcdir)/statestr.c $(std_unity_list) 462 $(run_unity) $< $@ 463 464### 465 466test_strtolfp_CFLAGS = \ 467 $(CFLAGS_LIBEVENT) \ 468 $(AM_CFLAGS) \ 469 $(NULL) 470 471test_strtolfp_SOURCES = \ 472 strtolfp.c \ 473 run-strtolfp.c \ 474 lfptest.c \ 475 $(NULL) 476 477$(srcdir)/run-strtolfp.c: $(srcdir)/strtolfp.c $(std_unity_list) 478 $(run_unity) $< $@ 479 480### 481 482test_timespecops_SOURCES = \ 483 timespecops.c \ 484 run-timespecops.c \ 485 $(NULL) 486 487$(srcdir)/run-timespecops.c: $(srcdir)/timespecops.c $(std_unity_list) 488 $(run_unity) $< $@ 489 490### 491 492test_timevalops_SOURCES = \ 493 timevalops.c \ 494 run-timevalops.c \ 495 $(NULL) 496 497$(srcdir)/run-timevalops.c: $(srcdir)/timevalops.c $(std_unity_list) 498 $(run_unity) $< $@ 499 500### 501 502test_tsafememcmp_SOURCES = \ 503 tsafememcmp.c \ 504 run-tsafememcmp.c \ 505 $(NULL) 506 507$(srcdir)/run-tsafememcmp.c: $(srcdir)/tsafememcmp.c $(std_unity_list) 508 $(run_unity) $< $@ 509 510### 511 512test_tstotv_SOURCES = \ 513 tstotv.c \ 514 run-tstotv.c \ 515 $(NULL) 516 517$(srcdir)/run-tstotv.c: $(srcdir)/tstotv.c $(std_unity_list) 518 $(run_unity) $< $@ 519 520### 521 522test_tvtots_SOURCES = \ 523 tvtots.c \ 524 run-tvtots.c \ 525 lfptest.c \ 526 $(NULL) 527 528$(srcdir)/run-tvtots.c: $(srcdir)/tvtots.c $(std_unity_list) 529 $(run_unity) $< $@ 530 531### 532 533test_uglydate_SOURCES = \ 534 uglydate.c \ 535 run-uglydate.c \ 536 $(NULL) 537 538$(srcdir)/run-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list) 539 $(run_unity) $< $@ 540 541### 542 543test_vi64ops_SOURCES = \ 544 vi64ops.c \ 545 run-vi64ops.c \ 546 $(NULL) 547 548$(srcdir)/run-vi64ops.c: $(srcdir)/vi64ops.c $(std_unity_list) 549 $(run_unity) $< $@ 550 551### 552 553test_ymd2yd_SOURCES = \ 554 ymd2yd.c \ 555 run-ymd2yd.c \ 556 $(NULL) 557 558$(srcdir)/run-ymd2yd.c: $(srcdir)/ymd2yd.c $(std_unity_list) 559 $(run_unity) $< $@ 560 561### 562 563TESTS = 564 565if !NTP_CROSSCOMPILE 566TESTS += $(check_PROGRAMS) 567endif 568 569## check-libntp.mf - automake fragment 570## slightly adapted for deeper directory 571 572BUILT_SOURCES += check-libntp check-libunity 573CLEANFILES += check-libntp check-libunity 574 575check-libntp: ../../libntp/libntp.a 576 @echo stamp > $@ 577 578../../libntp/libntp.a: 579 cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a 580 581check-libunity: ../../sntp/unity/libunity.a 582 @echo stamp > $@ 583 584../../sntp/unity/libunity.a: 585 cd ../../sntp/unity && $(MAKE) $(AM_MAKEFLAGS) libunity.a 586 587include $(top_srcdir)/depsver.mf 588include $(top_srcdir)/includes.mf 589