There's no GNUNET_LDFLAGS, there's only GN_LIB_FLAGS
[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 libexec_PROGRAMS = \
24  gnunet-service-sensor
25
26 lib_LTLIBRARIES = \
27  libgnunetsensor.la \
28  libgnunetsensorutil.la
29
30 gnunet_sensor_SOURCES = \
31  gnunet-sensor.c         
32 gnunet_sensor_LDADD = \
33   $(top_builddir)/src/util/libgnunetutil.la \
34   libgnunetsensor.la \
35   $(GN_LIBINTL)
36
37 gnunet_service_sensor_SOURCES = \
38  gnunet-service-sensor.c \
39  gnunet-service-sensor-analysis.c \
40  gnunet-service-sensor-reporting.c \
41  gnunet-service-sensor-update.c
42 gnunet_service_sensor_LDADD = \
43   libgnunetsensorutil.la \
44   $(top_builddir)/src/util/libgnunetutil.la \
45   $(top_builddir)/src/statistics/libgnunetstatistics.la \
46   $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
47   $(top_builddir)/src/cadet/libgnunetcadet.la \
48   $(GN_LIBINTL)
49
50 libgnunetsensor_la_SOURCES = \
51   sensor_api.c 
52 libgnunetsensor_la_LIBADD = \
53   $(top_builddir)/src/util/libgnunetutil.la
54 libgnunetsensor_la_LDFLAGS = \
55   $(GN_LIB_LDFLAGS)
56
57 libgnunetsensorutil_la_SOURCES = \
58   sensor_util_lib.c
59 libgnunetsensorutil_la_LIBADD = \
60   $(top_builddir)/src/util/libgnunetutil.la \
61   $(top_builddir)/src/statistics/libgnunetstatistics.la
62 libgnunetsensorutil_la_LDFLAGS = \
63   $(GN_LIB_LDFLAGS)
64 libgnunetsensorutil_la_DEPENDENCIES = \
65   $(top_builddir)/src/util/libgnunetutil.la \
66   $(top_builddir)/src/statistics/libgnunetstatistics.la
67
68 plugin_LTLIBRARIES = \
69   libgnunet_plugin_sensor_model_gaussian.la
70   
71 libgnunet_plugin_sensor_model_gaussian_la_SOURCES = \
72   plugin_sensor_model_gaussian.c
73 libgnunet_plugin_sensor_model_gaussian_la_LIBADD = \
74   $(top_builddir)/src/sensor/libgnunetsensor.la  \
75   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) \
76   $(LTLIBINTL)
77 libgnunet_plugin_sensor_model_gaussian_la_LDFLAGS = \
78  $(GN_PLUGIN_LDFLAGS)
79 libgnunet_plugin_sensor_model_gaussian_la_DEPENDENCIES = \
80   $(top_builddir)/src/util/libgnunetutil.la \
81   libgnunetsensor.la
82
83 check_PROGRAMS = \
84  test_sensor_api
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 pkgsensordir = sensors
97
98 install-data-local:
99         $(mkinstalldirs) $(datadir)/$(PACKAGE)/$(pkgsensordir)
100         @$(NORMAL_INSTALL)
101         for sensor in $(pkgsensordir)/*; do \
102           cp -a $$sensor $(datadir)/$(PACKAGE)/$(pkgsensordir)/ ; \
103         done