(no commit message)
[oweals/gnunet.git] / src / datastore / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 plugindir = $(libdir)/gnunet
4
5 if MINGW
6   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
7 endif
8
9 if USE_COVERAGE
10   AM_CFLAGS = --coverage -O0
11   XLIBS = -lgcov
12 endif
13
14
15 lib_LTLIBRARIES = \
16   libgnunetdatastore.la
17
18 libgnunetdatastore_la_SOURCES = \
19   datastore_api.c datastore.h plugin_datastore.h
20 libgnunetdatastore_la_LIBADD = \
21   $(top_builddir)/src/util/libgnunetutil.la \
22   $(GN_LIBINTL) 
23 libgnunetdatastore_la_LDFLAGS = \
24   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
25   -version-info 0:0:0
26
27
28 bin_PROGRAMS = \
29  gnunet-service-datastore
30
31 gnunet_service_datastore_SOURCES = \
32  gnunet-service-datastore.c plugin_datastore.h
33 gnunet_service_datastore_LDADD = \
34   $(top_builddir)/src/statistics/libgnunetstatistics.la \
35   $(top_builddir)/src/util/libgnunetutil.la \
36   $(GN_LIBINTL)
37
38 if HAVE_SQLITE
39   SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la
40 endif
41
42 plugin_LTLIBRARIES = \
43   $(SQLITE_PLUGIN) \
44   libgnunet_plugin_datastore_template.la 
45
46
47 libgnunet_plugin_datastore_sqlite_la_SOURCES = \
48   plugin_datastore_sqlite.c
49 libgnunet_plugin_datastore_sqlite_la_LIBADD = \
50   $(top_builddir)/src/statistics/libgnunetstatistics.la \
51   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3
52 libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \
53  $(GN_PLUGIN_LDFLAGS)
54
55 libgnunet_plugin_datastore_template_la_SOURCES = \
56   plugin_datastore_template.c
57 libgnunet_plugin_datastore_template_la_LIBADD = \
58   $(top_builddir)/src/util/libgnunetutil.la $(XLIBS)
59 libgnunet_plugin_datastore_template_la_LDFLAGS = \
60  $(GN_PLUGIN_LDFLAGS)
61
62
63 if HAVE_SQLITE
64 SQLITE_TESTS = \
65  test_datastore_api \
66  test_datastore_api_management \
67  perf_datastore_api \
68  perf_plugin_datastore
69
70 endif
71
72 check_PROGRAMS = \
73   $(SQLITE_TESTS)
74
75 if !DISABLE_TEST_RUN
76 TESTS = $(check_PROGRAMS)
77 endif
78
79 test_datastore_api_SOURCES = \
80  test_datastore_api.c
81 test_datastore_api_LDADD = \
82  $(top_builddir)/src/datastore/libgnunetdatastore.la \
83  $(top_builddir)/src/util/libgnunetutil.la  
84
85 test_datastore_api_management_SOURCES = \
86  test_datastore_api_management.c
87 test_datastore_api_management_LDADD = \
88  $(top_builddir)/src/datastore/libgnunetdatastore.la \
89  $(top_builddir)/src/util/libgnunetutil.la  
90
91 perf_datastore_api_SOURCES = \
92  perf_datastore_api.c
93 perf_datastore_api_LDADD = \
94  $(top_builddir)/src/datastore/libgnunetdatastore.la \
95  $(top_builddir)/src/util/libgnunetutil.la  
96
97 perf_plugin_datastore_SOURCES = \
98  perf_plugin_datastore.c
99 perf_plugin_datastore_LDADD = \
100  $(top_builddir)/src/util/libgnunetutil.la  
101
102
103 EXTRA_DIST = \
104  test_datastore_api_data.conf \
105  perf_plugin_datastore_data.conf