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