changes
[oweals/gnunet.git] / src / sysmon / Makefile.am
index dd9c2469109887b3c374ffde9781e9fbebdb9e5c..16fed202f4d07a5461d795f91f17140ab68a50d2 100644 (file)
@@ -1,9 +1,16 @@
-INCLUDES = -I$(top_srcdir)/src/include -I/usr/include/glib-2.0 -I/usr/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -I/usr/include/libgtop-2.0/
+INCLUDES = -I$(top_srcdir)/src/include
 
 pkgcfgdir= $(pkgdatadir)/config.d/
 
 libexecdir= $(pkglibdir)/libexec/
 
+if HAVE_LIBGTOP
+  GN_LIBTOP = -lgtop-2.0 -lglib-2.0
+  GN_SYSMON_TEST_INIT = test_glibtop
+  GN_SYSMON_TEST_PROCESS = test_glibtop_process
+  GN_SYSMON_TEST_NETWORK = test_glibtop_network 
+endif
+
 pkgcfg_DATA = \
   sysmon.conf
 
@@ -16,26 +23,28 @@ if USE_COVERAGE
 endif
 
 libexec_PROGRAMS = \
- gnunet_daemon_sysmon
+ gnunet_service_sysmon
 
 check_PROGRAMS = \
test_glibtop \
test_glibtop_process \
- test_glibtop_network
$(GN_SYSMON_TEST_INIT) \
$(GN_SYSMON_TEST_PROCESS) \
+ $(GN_SYSMON_TEST_NETWORK)
  
-gnunet_daemon_sysmon_SOURCES = \
- gnunet-daemon-sysmon.c         
-gnunet_daemon_sysmon_LDADD = \
+gnunet_service_sysmon_SOURCES = \
+ gnunet-service-sysmon.c         
+gnunet_service_sysmon_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
+  $(GN_LIBTOP) \
   $(GN_LIBINTL)
 
+if HAVE_GLIB2
 test_glibtop_SOURCES = \
  test_glibtop.c      
 test_glibtop_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
-  -lgtop-2.0 \
+  $(GN_LIBTOP) \
   $(GN_LIBINTL)
 
 test_glibtop_process_SOURCES = \
@@ -43,7 +52,7 @@ test_glibtop_process_SOURCES = \
 test_glibtop_process_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
-  -lgtop-2.0 \
+  $(GN_LIBTOP) \
   $(GN_LIBINTL)
 
 test_glibtop_network_SOURCES = \
@@ -51,10 +60,14 @@ test_glibtop_network_SOURCES = \
 test_glibtop_network_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
-  -lgtop-2.0 \
+  $(GN_LIBTOP) \
   $(GN_LIBINTL)
+endif
 
 
 if ENABLE_TEST_RUN
 TESTS = $(check_PROGRAMS)
 endif
+
+EXTRA_DIST = \
+sysmon-properties.conf