-patch from #1972 to display disconnects instead of exiting
[oweals/gnunet.git] / src / ats / Makefile.am
index 35cd75f59c8c48d1ac101815c8687350998a6663..5b7e9a1272e2408bde70d901a11f2e0f4e3cfda6 100644 (file)
@@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/src/include
 
 pkgcfgdir= $(pkgdatadir)/config.d/
 
-dist_pkgcfg_DATA = \
+pkgcfg_DATA = \
   ats.conf
 
 if MINGW
@@ -13,6 +13,13 @@ if USE_COVERAGE
   AM_CFLAGS = -fprofile-arcs -ftest-coverage
 endif
 
+if HAVE_LIBGLPK
+  GN_LIBGLPK = -lglpk
+  GN_MLP_SRC = gnunet-service-ats_addresses_mlp.c gnunet-service-ats_addresses_mlp.h
+  GN_MLP_TEST = test_ats_mlp
+  GN_MLP_PERF = perf_ats_mlp
+endif
+
 lib_LTLIBRARIES = libgnunetats.la
 
 libgnunetats_la_SOURCES = \
@@ -22,6 +29,10 @@ libgnunetats_la_SOURCES = \
 libgnunetats_la_LIBADD = \
  $(top_builddir)/src/util/libgnunetutil.la
 
+libgnunetats_la_LDFLAGS = \
+ $(GN_LIB_LDFLAGS) \
+  -version-info 1:0:1
+
 
 bin_PROGRAMS = \
  gnunet-service-ats
@@ -29,29 +40,58 @@ bin_PROGRAMS = \
 gnunet_service_ats_SOURCES = \
  gnunet-service-ats.c gnunet-service-ats.h\
  gnunet-service-ats_addresses.c gnunet-service-ats_addresses.h \
+ $(GN_MLP_SRC) \
  gnunet-service-ats_performance.c gnunet-service-ats_performance.h \
  gnunet-service-ats_scheduling.c gnunet-service-ats_scheduling.h \
  gnunet-service-ats_reservations.c gnunet-service-ats_reservations.h
 gnunet_service_ats_LDADD = \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
   $(top_builddir)/src/util/libgnunetutil.la \
+  $(GN_LIBGLPK) \
   $(GN_LIBINTL)
 
 
 check_PROGRAMS = \
- test_ats_api_scheduling
+ test_ats_api_scheduling \
+ $(GN_MLP_TEST) \
+ $(GN_MLP_PERF)
+# test_ats_api_scheduling_get_type
 # test_ats_api_bandwidth_consumption
 
 if ENABLE_TEST_RUN
 TESTS = $(check_PROGRAMS)
 endif
 
+if HAVE_LIBGLPK
+test_ats_mlp_SOURCES = \
+ $(GN_MLP_SRC) \
+ test_ats_mlp.c
+test_ats_mlp_LDADD = \
+  $(GN_LIBGLPK) \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(top_builddir)/src/statistics/libgnunetstatistics.la
+  
+perf_ats_mlp_SOURCES = \
+ $(GN_MLP_SRC) \
+ perf_ats_mlp.c
+perf_ats_mlp_LDADD = \
+  $(GN_LIBGLPK) \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(top_builddir)/src/statistics/libgnunetstatistics.la  
+endif
+
 test_ats_api_scheduling_SOURCES = \
  test_ats_api_scheduling.c
 test_ats_api_scheduling_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(top_builddir)/src/ats/libgnunetats.la  
 
+#test_ats_api_scheduling_get_type_SOURCES = \
+# test_ats_api_scheduling_get_type.c
+#test_ats_api_scheduling_get_type_LDADD = \
+#  $(top_builddir)/src/util/libgnunetutil.la \
+#  $(top_builddir)/src/ats/libgnunetats.la  
+
 #test_ats_api_bandwidth_consumption_SOURCES = \
 # test_ats_api_bandwidth_consumption.c
 #test_ats_api_bandwidth_consumption_LDADD = \