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