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