db2a150e2a64b27b318ec856bb6fc0e6dbe2d289
[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_destroy_address \
67  test_ats_api_scheduling_destroy_session \
68  test_ats_api_scheduling_destroy_inbound_connection \
69  test_ats_api_scheduling_block_and_reset \
70  test_ats_simplistic \
71  test_ats_api_performance
72 # $(GN_MLP_TEST) \
73 # $(GN_MLP_TEST_AVG) \
74 # $(GN_MLP_PERF)
75 # test_ats_api_scheduling_get_type
76 # test_ats_api_bandwidth_consumption
77
78 if ENABLE_TEST_RUN
79 TESTS = $(check_PROGRAMS)
80 endif
81
82 test_ats_api_scheduling_init_SOURCES = \
83  test_ats_api_scheduling_init.c test_ats_api_common.c
84 test_ats_api_scheduling_init_LDADD = \
85   $(top_builddir)/src/util/libgnunetutil.la \
86   $(top_builddir)/src/testing/libgnunettesting.la \
87   $(top_builddir)/src/ats/libgnunetats.la  
88
89 test_ats_api_scheduling_add_address_SOURCES = \
90  test_ats_api_scheduling_add_address.c test_ats_api_common.c
91 test_ats_api_scheduling_add_address_LDADD = \
92   $(top_builddir)/src/util/libgnunetutil.la \
93   $(top_builddir)/src/testing/libgnunettesting.la \
94   $(top_builddir)/src/ats/libgnunetats.la  
95
96 test_ats_api_scheduling_add_session_SOURCES = \
97  test_ats_api_scheduling_add_session.c test_ats_api_common.c
98 test_ats_api_scheduling_add_session_LDADD = \
99   $(top_builddir)/src/util/libgnunetutil.la \
100   $(top_builddir)/src/testing/libgnunettesting.la \
101   $(top_builddir)/src/ats/libgnunetats.la  
102
103 test_ats_api_scheduling_update_address_SOURCES = \
104  test_ats_api_scheduling_update_address.c test_ats_api_common.c
105 test_ats_api_scheduling_update_address_LDADD = \
106   $(top_builddir)/src/util/libgnunetutil.la \
107   $(top_builddir)/src/testing/libgnunettesting.la \
108   $(top_builddir)/src/ats/libgnunetats.la  
109
110 test_ats_api_scheduling_destroy_address_SOURCES = \
111  test_ats_api_scheduling_destroy_address.c test_ats_api_common.c
112 test_ats_api_scheduling_destroy_address_LDADD = \
113   $(top_builddir)/src/util/libgnunetutil.la \
114   $(top_builddir)/src/testing/libgnunettesting.la \
115   $(top_builddir)/src/ats/libgnunetats.la  
116
117 test_ats_api_scheduling_destroy_session_SOURCES = \
118  test_ats_api_scheduling_destroy_session.c test_ats_api_common.c
119 test_ats_api_scheduling_destroy_session_LDADD = \
120   $(top_builddir)/src/util/libgnunetutil.la \
121   $(top_builddir)/src/testing/libgnunettesting.la \
122   $(top_builddir)/src/ats/libgnunetats.la
123   
124 test_ats_api_scheduling_destroy_inbound_connection_SOURCES = \
125  test_ats_api_scheduling_destroy_inbound_connection.c test_ats_api_common.c
126 test_ats_api_scheduling_destroy_inbound_connection_LDADD = \
127   $(top_builddir)/src/util/libgnunetutil.la \
128   $(top_builddir)/src/testing/libgnunettesting.la \
129   $(top_builddir)/src/ats/libgnunetats.la
130   
131 test_ats_api_scheduling_block_and_reset_SOURCES = \
132  test_ats_api_scheduling_block_and_reset.c test_ats_api_common.c
133 test_ats_api_scheduling_block_and_reset_LDADD = \
134   $(top_builddir)/src/util/libgnunetutil.la \
135   $(top_builddir)/src/testing/libgnunettesting.la \
136   $(top_builddir)/src/ats/libgnunetats.la
137   
138 test_ats_api_performance_SOURCES = \
139  test_ats_api_performance.c
140 test_ats_api_performance_LDADD = \
141   $(top_builddir)/src/util/libgnunetutil.la \
142   $(top_builddir)/src/testing/libgnunettesting.la \
143   $(top_builddir)/src/hello/libgnunethello.la \
144   $(top_builddir)/src/ats/libgnunetats.la    
145
146 test_ats_simplistic_SOURCES = \
147  test_ats_simplistic.c test_ats_api_common.c
148 test_ats_simplistic_LDADD = \
149   $(top_builddir)/src/util/libgnunetutil.la \
150   $(top_builddir)/src/testing/libgnunettesting.la \
151   $(top_builddir)/src/hello/libgnunethello.la \
152   $(top_builddir)/src/ats/libgnunetats.la    
153
154
155 if HAVE_LIBGLPK
156 #test_ats_mlp_SOURCES = \
157 # $(GN_MLP_SRC) \
158 # test_ats_mlp.c
159 #test_ats_mlp_LDADD = \
160 #  $(GN_LIBGLPK) \
161 #  $(top_builddir)/src/util/libgnunetutil.la \
162 #  $(top_builddir)/src/statistics/libgnunetstatistics.la
163
164 #test_ats_mlp_averaging_SOURCES = \
165 # $(GN_MLP_SRC) \
166 # test_ats_mlp_averaging.c
167 #test_ats_mlp_averaging_LDADD = \
168 #  $(GN_LIBGLPK) \
169 #  $(top_builddir)/src/util/libgnunetutil.la \
170 #  $(top_builddir)/src/statistics/libgnunetstatistics.la
171
172 #perf_ats_mlp_SOURCES = \
173 # $(GN_MLP_SRC) \
174 # perf_ats_mlp.c
175 #perf_ats_mlp_LDADD = \
176 #  $(GN_LIBGLPK) \
177 #  $(top_builddir)/src/util/libgnunetutil.la \
178 #  $(top_builddir)/src/statistics/libgnunetstatistics.la
179 endif
180
181 #test_ats_api_bandwidth_consumption_SOURCES = \
182 # test_ats_api_bandwidth_consumption.c
183 #test_ats_api_bandwidth_consumption_LDADD = \
184 #  $(top_builddir)/src/util/libgnunetutil.la \
185 #  $(top_builddir)/src/testing/libgnunettesting.la \
186 #  $(top_builddir)/src/ats/libgnunetats.la  
187
188
189 EXTRA_DIST = \
190   ats.h \
191   test_ats_api.conf
192