-fix warning
[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
23 noinst_PROGRAMS = \
24  gnunet-sensor-profiler \
25  perf-pow-sign
26
27 libexec_PROGRAMS = \
28  gnunet-service-sensor
29
30 lib_LTLIBRARIES = \
31  libgnunetsensor.la \
32  libgnunetsensorutil.la
33
34 gnunet_sensor_SOURCES = \
35  gnunet-sensor.c         
36 gnunet_sensor_LDADD = \
37   $(top_builddir)/src/util/libgnunetutil.la \
38   libgnunetsensor.la \
39   $(GN_LIBINTL)
40
41 gnunet_service_sensor_SOURCES = \
42  gnunet-service-sensor.c \
43  gnunet-service-sensor_monitoring.c \
44  gnunet-service-sensor_analysis.c \
45  gnunet-service-sensor_reporting.c \
46  gnunet-service-sensor_update.c
47 gnunet_service_sensor_LDADD = \
48   libgnunetsensorutil.la \
49   $(top_builddir)/src/util/libgnunetutil.la \
50   $(top_builddir)/src/statistics/libgnunetstatistics.la \
51   $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
52   $(top_builddir)/src/cadet/libgnunetcadet.la \
53   $(top_builddir)/src/core/libgnunetcore.la \
54   $(GN_LIBINTL)
55
56 libgnunetsensor_la_SOURCES = \
57   sensor_api.c 
58 libgnunetsensor_la_LIBADD = \
59   $(top_builddir)/src/util/libgnunetutil.la
60 libgnunetsensor_la_LDFLAGS = \
61   $(GN_LIB_LDFLAGS)
62
63 libgnunetsensorutil_la_SOURCES = \
64   sensor_util_lib.c \
65   sensor_util_lib_crypto.c
66 libgnunetsensorutil_la_LIBADD = \
67   $(top_builddir)/src/util/libgnunetutil.la \
68   $(top_builddir)/src/statistics/libgnunetstatistics.la
69 libgnunetsensorutil_la_LDFLAGS = \
70   $(GN_LIB_LDFLAGS)
71
72 plugin_LTLIBRARIES = \
73   libgnunet_plugin_sensor_model_gaussian.la
74
75 libgnunet_plugin_sensor_model_gaussian_la_SOURCES = \
76   plugin_sensor_model_gaussian.c
77 libgnunet_plugin_sensor_model_gaussian_la_LIBADD = \
78   libgnunetsensor.la  \
79   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
80   $(LTLIBINTL)
81 libgnunet_plugin_sensor_model_gaussian_la_LDFLAGS = \
82  $(GN_PLUGIN_LDFLAGS)
83
84 check_PROGRAMS = \
85  test_sensor_api \
86  test_gnunet-service-sensor_reporting \
87  test_pow_sign
88
89 if ENABLE_TEST_RUN
90 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
91 TESTS = $(check_PROGRAMS)
92 endif
93
94 test_sensor_api_SOURCES = \
95   test_sensor_api.c
96 test_sensor_api_LDADD = \
97   $(top_builddir)/src/util/libgnunetutil.la
98
99 test_gnunet_service_sensor_reporting_SOURCES = \
100   test_gnunet-service-sensor_reporting.c
101 test_gnunet_service_sensor_reporting_LDADD = \
102   libgnunetsensor.la \
103   libgnunetsensorutil.la \
104   $(top_builddir)/src/util/libgnunetutil.la \
105   $(top_builddir)/src/testbed/libgnunettestbed.la \
106   $(top_builddir)/src/peerstore/libgnunetpeerstore.la
107
108 test_pow_sign_SOURCES = \
109   test_pow_sign.c
110 test_pow_sign_LDADD = \
111   $(top_builddir)/src/util/libgnunetutil.la \
112   $(top_builddir)/src/testbed/libgnunettestbed.la \
113   libgnunetsensorutil.la
114
115 gnunet_sensor_profiler_SOURCES = \
116   gnunet-sensor-profiler.c
117 gnunet_sensor_profiler_LDADD = \
118   libgnunetsensor.la \
119   $(top_builddir)/src/util/libgnunetutil.la \
120   $(top_builddir)/src/testbed/libgnunettestbed.la \
121   $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
122   $(top_builddir)/src/statistics/libgnunetstatistics.la
123
124 perf_pow_sign_SOURCES = \
125   perf_pow_sign.c
126 perf_pow_sign_LDADD = \
127   $(top_builddir)/src/util/libgnunetutil.la \
128   $(top_builddir)/src/testbed/libgnunettestbed.la \
129   libgnunetsensorutil.la
130
131 pkgsensordir = sensors
132
133 install-data-local:
134         $(mkinstalldirs) $(datadir)/$(PACKAGE)/$(pkgsensordir)
135         @$(NORMAL_INSTALL)
136         for sensor in $(pkgsensordir)/*; do \
137           cp -a $$sensor $(datadir)/$(PACKAGE)/$(pkgsensordir)/ ; \
138         done