fixing parallel build, getting rid of useless _DEPENDENCIES declarations
[oweals/gnunet.git] / src / sensor / Makefile.am
1 AM_CPPFLAGS = -I$(top_srcdir)/src/include
2
3 pkgcfgdir= $(pkgdatadir)/config.d/
4
5 libexecdir= $(pkglibdir)/libexec/
6
7 plugindir = $(libdir)/gnunet
8
9 dist_pkgcfg_DATA = \
10   sensor.conf
11
12 if MINGW
13  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols 
14 endif
15
16 if USE_COVERAGE
17   AM_CFLAGS = -fprofile-arcs -ftest-coverage
18 endif
19
20 bin_PROGRAMS = \
21  gnunet-sensor \
22  gnunet-sensor-profiler 
23
24 libexec_PROGRAMS = \
25  gnunet-service-sensor
26
27 lib_LTLIBRARIES = \
28  libgnunetsensor.la \
29  libgnunetsensorutil.la
30
31 gnunet_sensor_SOURCES = \
32  gnunet-sensor.c         
33 gnunet_sensor_LDADD = \
34   $(top_builddir)/src/util/libgnunetutil.la \
35   libgnunetsensor.la \
36   $(GN_LIBINTL)
37
38 gnunet_service_sensor_SOURCES = \
39  gnunet-service-sensor.c \
40  gnunet-service-sensor_monitoring.c \
41  gnunet-service-sensor_analysis.c \
42  gnunet-service-sensor_reporting.c \
43  gnunet-service-sensor_update.c
44 gnunet_service_sensor_LDADD = \
45   libgnunetsensorutil.la \
46   $(top_builddir)/src/util/libgnunetutil.la \
47   $(top_builddir)/src/statistics/libgnunetstatistics.la \
48   $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
49   $(top_builddir)/src/cadet/libgnunetcadet.la \
50   $(top_builddir)/src/core/libgnunetcore.la \
51   $(GN_LIBINTL)
52
53 libgnunetsensor_la_SOURCES = \
54   sensor_api.c 
55 libgnunetsensor_la_LIBADD = \
56   $(top_builddir)/src/util/libgnunetutil.la
57 libgnunetsensor_la_LDFLAGS = \
58   $(GN_LIB_LDFLAGS)
59
60 libgnunetsensorutil_la_SOURCES = \
61   sensor_util_lib.c \
62   sensor_util_lib_crypto.c
63 libgnunetsensorutil_la_LIBADD = \
64   $(top_builddir)/src/util/libgnunetutil.la \
65   $(top_builddir)/src/statistics/libgnunetstatistics.la
66 libgnunetsensorutil_la_LDFLAGS = \
67   $(GN_LIB_LDFLAGS)
68
69 plugin_LTLIBRARIES = \
70   libgnunet_plugin_sensor_model_gaussian.la
71
72 libgnunet_plugin_sensor_model_gaussian_la_SOURCES = \
73   plugin_sensor_model_gaussian.c
74 libgnunet_plugin_sensor_model_gaussian_la_LIBADD = \
75   libgnunetsensor.la  \
76   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
77   $(LTLIBINTL)
78 libgnunet_plugin_sensor_model_gaussian_la_LDFLAGS = \
79  $(GN_PLUGIN_LDFLAGS)
80
81 check_PROGRAMS = \
82  test_sensor_api \
83  test_gnunet-service-sensor_reporting \
84  test_pow_sign
85
86 if ENABLE_TEST_RUN
87 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
88 TESTS = $(check_PROGRAMS)
89 endif
90
91 test_sensor_api_SOURCES = \
92   test_sensor_api.c
93 test_sensor_api_LDADD = \
94   $(top_builddir)/src/util/libgnunetutil.la
95
96 test_gnunet_service_sensor_reporting_SOURCES = \
97   test_gnunet-service-sensor_reporting.c
98 test_gnunet_service_sensor_reporting_LDADD = \
99   libgnunetsensor.la \
100   libgnunetsensorutil.la \
101   $(top_builddir)/src/util/libgnunetutil.la \
102   $(top_builddir)/src/testbed/libgnunettestbed.la \
103   $(top_builddir)/src/peerstore/libgnunetpeerstore.la
104
105 test_pow_sign_SOURCES = \
106   test_pow_sign.c
107 test_pow_sign_LDADD = \
108   $(top_builddir)/src/util/libgnunetutil.la \
109   $(top_builddir)/src/testbed/libgnunettestbed.la \
110   libgnunetsensorutil.la
111
112 gnunet_sensor_profiler_SOURCES = \
113   gnunet-sensor-profiler.c
114 gnunet_sensor_profiler_LDADD = \
115   libgnunetsensor.la \
116   $(top_builddir)/src/util/libgnunetutil.la \
117   $(top_builddir)/src/testbed/libgnunettestbed.la \
118   $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
119   $(top_builddir)/src/transport/libgnunettransport.la
120
121 pkgsensordir = sensors
122
123 install-data-local:
124         $(mkinstalldirs) $(datadir)/$(PACKAGE)/$(pkgsensordir)
125         @$(NORMAL_INSTALL)
126         for sensor in $(pkgsensordir)/*; do \
127           cp -a $$sensor $(datadir)/$(PACKAGE)/$(pkgsensordir)/ ; \
128         done