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