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