]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/tests/sandbox/Makefile.am
Upgrade NTP to 4.2.8p4.
[FreeBSD/releng/10.2.git] / contrib / ntp / tests / sandbox / Makefile.am
1 #AUTOMAKE_OPTIONS = foreign 2.9 subdir-objects
2
3 NULL =
4 BUILT_SOURCES =
5 CLEANFILES =
6
7 std_unity_list =                                                \
8         $(top_srcdir)/sntp/unity/auto/generate_test_runner.rb   \
9         $(NULL)
10
11 run_unity =     cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
12
13 check_PROGRAMS =        \
14         first-test      \
15         smeartest       \
16         $(NULL)
17
18 EXTRA_PROGRAMS =        \
19         bug-2803        \
20         second-test     \
21         $(NULL)
22
23 # HMS: we may not need some of these:
24 LDADD =                                 \
25         $(top_builddir)/sntp/unity/libunity.a   \
26         $(top_builddir)/libntp/libntp.a \
27         $(LDADD_LIBNTP)                 \
28         $(PTHREAD_LIBS)                 \
29         $(LDADD_NTP)                    \
30         $(NULL)
31
32 AM_CFLAGS       = $(CFLAGS_NTP)
33
34 # HMS: we may not need some of these:
35 AM_CPPFLAGS     = $(NTP_INCS)
36 AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
37 AM_CPPFLAGS += -I$(top_srcdir)/include
38 AM_CPPFLAGS += $(CPPFLAGS_NTP)
39 AM_CPPFLAGS += -DUNITY_INCLUDE_CONFIG_H
40 AM_CPPFLAGS += -I$(top_srcdir)/sntp/unity
41
42 AM_LDFLAGS = $(LDFLAGS_NTP)
43
44 bug_2803_SOURCES =              \
45         bug-2803.c              \
46         run-ut-2803.c           \
47         ut-2803.c               \
48         $(NULL)
49
50 $(srcdir)/run-ut-2803.c: $(srcdir)/ut-2803.c $(std_unity_list)
51         $(run_unity) ut-2803.c run-ut-2803.c
52 BUILT_SOURCES   += run-ut-2803.c
53
54 first_test_SOURCES =            \
55         uglydate.c              \
56         run-uglydate.c          \
57         $(NULL)
58
59 $(srcdir)/run-uglydate.c: $(srcdir)/uglydate.c $(std_unity_list)
60         $(run_unity) uglydate.c run-uglydate.c
61 BUILT_SOURCES   += run-uglydate.c
62
63 second_test_SOURCES =           \
64         modetoa.c               \
65         run-modetoa.c           \
66         $(NULL)
67
68 $(srcdir)/run-modetoa.c: $(srcdir)/modetoa.c $(std_unity_list)
69         $(run_unity) modetoa.c run-modetoa.c
70 BUILT_SOURCES   += run-modetoa.c
71
72
73 TESTS =
74
75 if !NTP_CROSSCOMPILE
76 TESTS += $(check_PROGRAMS)
77 endif
78
79 ## check-libntp.mf - automake fragment
80 ## slightly adapted for deeper directory
81
82 BUILT_SOURCES   += check-libntp check-libunity
83 CLEANFILES      += check-libntp check-libunity
84
85 check-libntp: ../../libntp/libntp.a
86         @echo stamp > $@
87
88 ../../libntp/libntp.a:
89         cd ../../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
90
91 check-libunity: ../../sntp/unity/libunity.a
92         @echo stamp > $@
93
94 ../../sntp/unity/libunity.a:
95         cd ../../libunity && $(MAKE) $(AM_MAKEFLAGS) libunity.a
96
97 include $(top_srcdir)/depsver.mf
98 include $(top_srcdir)/includes.mf