changes
[oweals/gnunet.git] / src / ats / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 pkgcfgdir= $(pkgdatadir)/config.d/
4
5 libexecdir= $(pkglibdir)/libexec/
6
7 pkgcfg_DATA = \
8   ats.conf
9
10 if MINGW
11  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols 
12 endif
13
14 if USE_COVERAGE
15   AM_CFLAGS = -fprofile-arcs -ftest-coverage
16 endif
17
18 if HAVE_LIBGLPK
19   GN_LIBGLPK = -lglpk
20   GN_MLP_SRC = gnunet-service-ats_addresses_mlp.c gnunet-service-ats_addresses_mlp.h
21   GN_MLP_TEST = test_ats_mlp 
22   GN_MLP_TEST_AVG = test_ats_mlp_averaging
23   GN_MLP_PERF = perf_ats_mlp
24 endif
25
26 lib_LTLIBRARIES = libgnunetats.la
27
28 libgnunetats_la_SOURCES = \
29   ats_api_scheduling.c \
30   ats_api_performance.c 
31
32 libgnunetats_la_LIBADD = \
33  $(top_builddir)/src/util/libgnunetutil.la \
34  $(LTLIBINTL)
35
36 libgnunetats_la_LDFLAGS = \
37  $(GN_LIB_LDFLAGS) \
38   -version-info 3:0:3
39
40
41 libexec_PROGRAMS = \
42  gnunet-service-ats
43
44 gnunet_service_ats_SOURCES = \
45  gnunet-service-ats.c gnunet-service-ats.h\
46  gnunet-service-ats_addresses.c gnunet-service-ats_addresses.h \
47  gnunet-service-ats_addresses_simplistic.c gnunet-service-ats_addresses_simplistic.h \
48  $(GN_MLP_SRC) \
49  gnunet-service-ats_performance.c gnunet-service-ats_performance.h \
50  gnunet-service-ats_scheduling.c gnunet-service-ats_scheduling.h \
51  gnunet-service-ats_reservations.c gnunet-service-ats_reservations.h
52 gnunet_service_ats_LDADD = \
53   $(top_builddir)/src/statistics/libgnunetstatistics.la \
54   $(top_builddir)/src/util/libgnunetutil.la \
55   libgnunetats.la \
56   $(GN_LIBGLPK) \
57   $(GN_LIBINTL)
58 gnunet_service_ats_DEPENDENCIES = \
59   libgnunetats.la
60
61 check_PROGRAMS = \
62  test_ats_api_scheduling_init \
63  test_ats_api_scheduling_add_address \
64  test_ats_api_scheduling_add_session \
65  test_ats_api_scheduling_update_address \
66  test_ats_api_scheduling_switch_network \
67  test_ats_api_scheduling_destroy_address \
68  test_ats_api_scheduling_destroy_session \
69  test_ats_api_scheduling_destroy_inbound_connection \
70  test_ats_api_scheduling_block_and_reset \
71  test_ats_simplistic \
72  test_ats_api_performance
73 # $(GN_MLP_TEST) \
74 # $(GN_MLP_TEST_AVG) \
75 # $(GN_MLP_PERF)
76 # test_ats_api_scheduling_get_type
77 # test_ats_api_bandwidth_consumption
78
79 if ENABLE_TEST_RUN
80 TESTS = $(check_PROGRAMS)
81 endif
82
83 test_ats_api_scheduling_init_SOURCES = \
84  test_ats_api_scheduling_init.c test_ats_api_common.c
85 test_ats_api_scheduling_init_LDADD = \
86   $(top_builddir)/src/util/libgnunetutil.la \
87   $(top_builddir)/src/testing/libgnunettesting.la \
88   $(top_builddir)/src/ats/libgnunetats.la  
89
90 test_ats_api_scheduling_add_address_SOURCES = \
91  test_ats_api_scheduling_add_address.c test_ats_api_common.c
92 test_ats_api_scheduling_add_address_LDADD = \
93   $(top_builddir)/src/util/libgnunetutil.la \
94   $(top_builddir)/src/testing/libgnunettesting.la \
95   $(top_builddir)/src/ats/libgnunetats.la  
96
97 test_ats_api_scheduling_add_session_SOURCES = \
98  test_ats_api_scheduling_add_session.c test_ats_api_common.c
99 test_ats_api_scheduling_add_session_LDADD = \
100   $(top_builddir)/src/util/libgnunetutil.la \
101   $(top_builddir)/src/testing/libgnunettesting.la \
102   $(top_builddir)/src/ats/libgnunetats.la  
103
104 test_ats_api_scheduling_update_address_SOURCES = \
105  test_ats_api_scheduling_update_address.c test_ats_api_common.c
106 test_ats_api_scheduling_update_address_LDADD = \
107   $(top_builddir)/src/util/libgnunetutil.la \
108   $(top_builddir)/src/testing/libgnunettesting.la \
109   $(top_builddir)/src/ats/libgnunetats.la  
110
111 test_ats_api_scheduling_switch_network_SOURCES = \
112  test_ats_api_scheduling_switch_network.c test_ats_api_common.c
113 test_ats_api_scheduling_switch_network_LDADD = \
114   $(top_builddir)/src/util/libgnunetutil.la \
115   $(top_builddir)/src/testing/libgnunettesting.la \
116   $(top_builddir)/src/ats/libgnunetats.la  
117
118   
119
120 test_ats_api_scheduling_destroy_address_SOURCES = \
121  test_ats_api_scheduling_destroy_address.c test_ats_api_common.c
122 test_ats_api_scheduling_destroy_address_LDADD = \
123   $(top_builddir)/src/util/libgnunetutil.la \
124   $(top_builddir)/src/testing/libgnunettesting.la \
125   $(top_builddir)/src/ats/libgnunetats.la  
126
127 test_ats_api_scheduling_destroy_session_SOURCES = \
128  test_ats_api_scheduling_destroy_session.c test_ats_api_common.c
129 test_ats_api_scheduling_destroy_session_LDADD = \
130   $(top_builddir)/src/util/libgnunetutil.la \
131   $(top_builddir)/src/testing/libgnunettesting.la \
132   $(top_builddir)/src/ats/libgnunetats.la
133   
134 test_ats_api_scheduling_destroy_inbound_connection_SOURCES = \
135  test_ats_api_scheduling_destroy_inbound_connection.c test_ats_api_common.c
136 test_ats_api_scheduling_destroy_inbound_connection_LDADD = \
137   $(top_builddir)/src/util/libgnunetutil.la \
138   $(top_builddir)/src/testing/libgnunettesting.la \
139   $(top_builddir)/src/ats/libgnunetats.la
140   
141 test_ats_api_scheduling_block_and_reset_SOURCES = \
142  test_ats_api_scheduling_block_and_reset.c test_ats_api_common.c
143 test_ats_api_scheduling_block_and_reset_LDADD = \
144   $(top_builddir)/src/util/libgnunetutil.la \
145   $(top_builddir)/src/testing/libgnunettesting.la \
146   $(top_builddir)/src/ats/libgnunetats.la
147   
148 test_ats_api_performance_SOURCES = \
149  test_ats_api_performance.c
150 test_ats_api_performance_LDADD = \
151   $(top_builddir)/src/util/libgnunetutil.la \
152   $(top_builddir)/src/testing/libgnunettesting.la \
153   $(top_builddir)/src/hello/libgnunethello.la \
154   $(top_builddir)/src/ats/libgnunetats.la    
155
156 test_ats_simplistic_SOURCES = \
157  test_ats_simplistic.c test_ats_api_common.c
158 test_ats_simplistic_LDADD = \
159   $(top_builddir)/src/util/libgnunetutil.la \
160   $(top_builddir)/src/testing/libgnunettesting.la \
161   $(top_builddir)/src/hello/libgnunethello.la \
162   $(top_builddir)/src/ats/libgnunetats.la    
163
164
165 if HAVE_LIBGLPK
166 #test_ats_mlp_SOURCES = \
167 # $(GN_MLP_SRC) \
168 # test_ats_mlp.c
169 #test_ats_mlp_LDADD = \
170 #  $(GN_LIBGLPK) \
171 #  $(top_builddir)/src/util/libgnunetutil.la \
172 #  $(top_builddir)/src/statistics/libgnunetstatistics.la
173
174 #test_ats_mlp_averaging_SOURCES = \
175 # $(GN_MLP_SRC) \
176 # test_ats_mlp_averaging.c
177 #test_ats_mlp_averaging_LDADD = \
178 #  $(GN_LIBGLPK) \
179 #  $(top_builddir)/src/util/libgnunetutil.la \
180 #  $(top_builddir)/src/statistics/libgnunetstatistics.la
181
182 #perf_ats_mlp_SOURCES = \
183 # $(GN_MLP_SRC) \
184 # perf_ats_mlp.c
185 #perf_ats_mlp_LDADD = \
186 #  $(GN_LIBGLPK) \
187 #  $(top_builddir)/src/util/libgnunetutil.la \
188 #  $(top_builddir)/src/statistics/libgnunetstatistics.la
189 endif
190
191 #test_ats_api_bandwidth_consumption_SOURCES = \
192 # test_ats_api_bandwidth_consumption.c
193 #test_ats_api_bandwidth_consumption_LDADD = \
194 #  $(top_builddir)/src/util/libgnunetutil.la \
195 #  $(top_builddir)/src/testing/libgnunettesting.la \
196 #  $(top_builddir)/src/ats/libgnunetats.la  
197
198
199 EXTRA_DIST = \
200   ats.h \
201   test_ats_api.conf
202