fix use-after-free on exit
[oweals/gnunet.git] / src / ats / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 plugindir = $(libdir)/gnunet
5
6 pkgcfgdir= $(pkgdatadir)/config.d/
7
8 libexecdir= $(pkglibdir)/libexec/
9
10 pkgcfg_DATA = \
11   ats.conf
12
13 if MINGW
14  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
15 endif
16
17 if USE_COVERAGE
18   AM_CFLAGS = -fprofile-arcs -ftest-coverage
19 endif
20
21 lib_LTLIBRARIES = libgnunetats.la
22
23 plugin_LTLIBRARIES = \
24   libgnunet_plugin_ats_proportional.la \
25   $(GN_MLP_LIB) \
26   libgnunet_plugin_ats_ril.la
27
28 if HAVE_LIBGLPK
29 plugin_LTLIBRARIES += \
30   libgnunet_plugin_ats_mlp.la
31 endif
32
33 libgnunetats_la_SOURCES = \
34   ats_api_connectivity.c \
35   ats_api_scanner.c \
36   ats_api_scheduling.c \
37   ats_api_performance.c
38 libgnunetats_la_LIBADD = \
39  $(top_builddir)/src/hello/libgnunethello.la \
40  $(top_builddir)/src/util/libgnunetutil.la \
41  $(LTLIBINTL)
42 libgnunetats_la_LDFLAGS = \
43   $(GN_LIB_LDFLAGS)  $(WINFLAGS) \
44   -version-info 4:0:0
45
46 libgnunet_plugin_ats_proportional_la_SOURCES = \
47   plugin_ats_proportional.c
48 libgnunet_plugin_ats_proportional_la_LIBADD = \
49   libgnunetats.la \
50   $(top_builddir)/src/statistics/libgnunetstatistics.la \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(LTLIBINTL)
53 libgnunet_plugin_ats_proportional_la_LDFLAGS = \
54   $(GN_PLUGIN_LDFLAGS)
55
56
57 if HAVE_LIBGLPK
58 libgnunet_plugin_ats_mlp_la_SOURCES = \
59   plugin_ats_mlp.c
60 libgnunet_plugin_ats_mlp_la_LIBADD = \
61   libgnunetats.la \
62   $(top_builddir)/src/statistics/libgnunetstatistics.la \
63   $(top_builddir)/src/util/libgnunetutil.la
64 libgnunet_plugin_ats_mlp_la_LDFLAGS = \
65   $(GN_PLUGIN_LDFLAGS) \
66   -lglpk
67 endif
68
69 libgnunet_plugin_ats_ril_la_SOURCES = \
70   plugin_ats_ril.c
71 libgnunet_plugin_ats_ril_la_LIBADD = \
72   libgnunetats.la \
73   $(top_builddir)/src/statistics/libgnunetstatistics.la \
74   $(top_builddir)/src/util/libgnunetutil.la \
75   $(LTLIBINTL)
76 libgnunet_plugin_ats_ril_la_LDFLAGS = \
77   $(GN_PLUGIN_LDFLAGS)
78
79 libexec_PROGRAMS = \
80  gnunet-service-ats
81
82 gnunet_service_ats_SOURCES = \
83  gnunet-service-ats.c gnunet-service-ats.h \
84  gnunet-service-ats_addresses.c gnunet-service-ats_addresses.h \
85  gnunet-service-ats_connectivity.c gnunet-service-ats_connectivity.h \
86  gnunet-service-ats_feedback.c gnunet-service-ats_feedback.h \
87  gnunet-service-ats_normalization.c gnunet-service-ats_normalization.h \
88  gnunet-service-ats_performance.c gnunet-service-ats_performance.h \
89  gnunet-service-ats_plugins.c gnunet-service-ats_plugins.h \
90  gnunet-service-ats_preferences.c gnunet-service-ats_preferences.h \
91  gnunet-service-ats_scheduling.c gnunet-service-ats_scheduling.h \
92  gnunet-service-ats_reservations.c gnunet-service-ats_reservations.h
93 gnunet_service_ats_LDADD = \
94   $(top_builddir)/src/statistics/libgnunetstatistics.la \
95   $(top_builddir)/src/util/libgnunetutil.la \
96   libgnunetats.la \
97   $(GN_LIBINTL)
98
99 if HAVE_TESTING
100 TESTING_TESTS = \
101  test_ats_api_proportional \
102  test_ats_reservation_api_proportional \
103  test_ats_api_ril
104 if HAVE_LIBGLPK
105 TESTING_TESTS += \
106  test_ats_api_mlp
107 endif
108 endif
109
110 check_PROGRAMS = \
111  $(TESTING_TESTS)
112
113 if ENABLE_TEST_RUN
114 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
115 TESTS = $(check_PROGRAMS)
116 endif
117
118 test_ats_api_proportional_SOURCES = \
119  test_ats_api.c \
120  test_ats_lib.c test_ats_lib.h
121 test_ats_api_proportional_LDADD = \
122   $(top_builddir)/src/util/libgnunetutil.la \
123   $(top_builddir)/src/hello/libgnunethello.la \
124   $(top_builddir)/src/testing/libgnunettesting.la \
125   libgnunetats.la
126
127 test_ats_reservation_api_proportional_SOURCES = \
128  test_ats_reservation_api.c \
129  test_ats_lib.c test_ats_lib.h
130 test_ats_reservation_api_proportional_LDADD = \
131   $(top_builddir)/src/util/libgnunetutil.la \
132   $(top_builddir)/src/hello/libgnunethello.la \
133   $(top_builddir)/src/testing/libgnunettesting.la \
134   libgnunetats.la
135
136 test_ats_api_ril_SOURCES = \
137  test_ats_api.c \
138  test_ats_lib.c test_ats_lib.h
139 test_ats_api_ril_LDADD = \
140   $(top_builddir)/src/util/libgnunetutil.la \
141   $(top_builddir)/src/hello/libgnunethello.la \
142   $(top_builddir)/src/testing/libgnunettesting.la \
143   libgnunetats.la
144
145 test_ats_api_mlp_SOURCES = \
146  test_ats_api.c \
147  test_ats_lib.c test_ats_lib.h
148 test_ats_api_mlp_LDADD = \
149   $(top_builddir)/src/util/libgnunetutil.la \
150   $(top_builddir)/src/hello/libgnunethello.la \
151   $(top_builddir)/src/testing/libgnunettesting.la \
152   libgnunetats.la
153
154 EXTRA_DIST = \
155   ats.h \
156   test_delay \
157   test_ats_api_mlp.conf \
158   test_ats_api_ril.conf \
159   test_ats_api_proportional.conf