diff options
Diffstat (limited to 'src/datastore/Makefile.am')
-rw-r--r-- | src/datastore/Makefile.am | 87 |
1 files changed, 65 insertions, 22 deletions
diff --git a/src/datastore/Makefile.am b/src/datastore/Makefile.am index 6fdf73d1a..fac20f191 100644 --- a/src/datastore/Makefile.am +++ b/src/datastore/Makefile.am | |||
@@ -35,12 +35,26 @@ gnunet_service_datastore_LDADD = \ | |||
35 | $(top_builddir)/src/util/libgnunetutil.la \ | 35 | $(top_builddir)/src/util/libgnunetutil.la \ |
36 | $(GN_LIBINTL) | 36 | $(GN_LIBINTL) |
37 | 37 | ||
38 | if HAVE_MYSQL | ||
39 | MYSQL_PLUGIN = libgnunet_plugin_datastore_mysql.la | ||
40 | MYSQL_TESTS = \ | ||
41 | test_datastore_api_mysql \ | ||
42 | test_datastore_api_management_mysql \ | ||
43 | perf_datastore_api_mysql \ | ||
44 | perf_plugin_datastore_mysql | ||
45 | endif | ||
38 | if HAVE_SQLITE | 46 | if HAVE_SQLITE |
39 | SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la | 47 | SQLITE_PLUGIN = libgnunet_plugin_datastore_sqlite.la |
48 | SQLITE_TESTS = \ | ||
49 | test_datastore_api_sqlite \ | ||
50 | test_datastore_api_management_sqlite \ | ||
51 | perf_datastore_api_sqlite \ | ||
52 | perf_plugin_datastore_sqlite | ||
40 | endif | 53 | endif |
41 | 54 | ||
42 | plugin_LTLIBRARIES = \ | 55 | plugin_LTLIBRARIES = \ |
43 | $(SQLITE_PLUGIN) \ | 56 | $(SQLITE_PLUGIN) \ |
57 | $(MYSQL_PLUGIN) \ | ||
44 | libgnunet_plugin_datastore_template.la | 58 | libgnunet_plugin_datastore_template.la |
45 | 59 | ||
46 | 60 | ||
@@ -52,6 +66,18 @@ libgnunet_plugin_datastore_sqlite_la_LIBADD = \ | |||
52 | libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \ | 66 | libgnunet_plugin_datastore_sqlite_la_LDFLAGS = \ |
53 | $(GN_PLUGIN_LDFLAGS) | 67 | $(GN_PLUGIN_LDFLAGS) |
54 | 68 | ||
69 | |||
70 | libgnunet_plugin_datastore_mysql_la_SOURCES = \ | ||
71 | plugin_datastore_mysql.c | ||
72 | libgnunet_plugin_datastore_mysql_la_LIBADD = \ | ||
73 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | ||
74 | $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lz -lsqlite3 | ||
75 | libgnunet_plugin_datastore_mysql_la_LDFLAGS = \ | ||
76 | $(GN_PLUGIN_LDFLAGS) $(MYSQL_LDFLAGS) | ||
77 | libgnunet_plugin_datastore_sqlite_la_CPFLAGS = \ | ||
78 | $(MYSQL_CPPFLAGS) | ||
79 | |||
80 | |||
55 | libgnunet_plugin_datastore_template_la_SOURCES = \ | 81 | libgnunet_plugin_datastore_template_la_SOURCES = \ |
56 | plugin_datastore_template.c | 82 | plugin_datastore_template.c |
57 | libgnunet_plugin_datastore_template_la_LIBADD = \ | 83 | libgnunet_plugin_datastore_template_la_LIBADD = \ |
@@ -59,47 +85,64 @@ libgnunet_plugin_datastore_template_la_LIBADD = \ | |||
59 | libgnunet_plugin_datastore_template_la_LDFLAGS = \ | 85 | libgnunet_plugin_datastore_template_la_LDFLAGS = \ |
60 | $(GN_PLUGIN_LDFLAGS) | 86 | $(GN_PLUGIN_LDFLAGS) |
61 | 87 | ||
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 = \ | 88 | check_PROGRAMS = \ |
73 | $(SQLITE_TESTS) | 89 | $(SQLITE_TESTS) \ |
90 | $(MYSQL_TESTS) | ||
74 | 91 | ||
75 | if !DISABLE_TEST_RUN | 92 | if !DISABLE_TEST_RUN |
76 | TESTS = $(check_PROGRAMS) | 93 | TESTS = $(check_PROGRAMS) |
77 | endif | 94 | endif |
78 | 95 | ||
79 | test_datastore_api_SOURCES = \ | 96 | test_datastore_api_sqlite_SOURCES = \ |
97 | test_datastore_api.c | ||
98 | test_datastore_api_sqlite_LDADD = \ | ||
99 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | ||
100 | $(top_builddir)/src/util/libgnunetutil.la | ||
101 | |||
102 | test_datastore_api_management_sqlite_SOURCES = \ | ||
103 | test_datastore_api_management.c | ||
104 | test_datastore_api_management_sqlite_LDADD = \ | ||
105 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | ||
106 | $(top_builddir)/src/util/libgnunetutil.la | ||
107 | |||
108 | perf_datastore_api_sqlite_SOURCES = \ | ||
109 | perf_datastore_api.c | ||
110 | perf_datastore_api_sqlite_LDADD = \ | ||
111 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | ||
112 | $(top_builddir)/src/util/libgnunetutil.la | ||
113 | |||
114 | perf_plugin_datastore_sqlite_SOURCES = \ | ||
115 | perf_plugin_datastore.c | ||
116 | perf_plugin_datastore_sqlite_LDADD = \ | ||
117 | $(top_builddir)/src/util/libgnunetutil.la | ||
118 | |||
119 | |||
120 | test_datastore_api_mysql_SOURCES = \ | ||
80 | test_datastore_api.c | 121 | test_datastore_api.c |
81 | test_datastore_api_LDADD = \ | 122 | test_datastore_api_mysql_LDADD = \ |
82 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | 123 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ |
83 | $(top_builddir)/src/util/libgnunetutil.la | 124 | $(top_builddir)/src/util/libgnunetutil.la |
84 | 125 | ||
85 | test_datastore_api_management_SOURCES = \ | 126 | test_datastore_api_management_mysql_SOURCES = \ |
86 | test_datastore_api_management.c | 127 | test_datastore_api_management.c |
87 | test_datastore_api_management_LDADD = \ | 128 | test_datastore_api_management_mysql_LDADD = \ |
88 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | 129 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ |
89 | $(top_builddir)/src/util/libgnunetutil.la | 130 | $(top_builddir)/src/util/libgnunetutil.la |
90 | 131 | ||
91 | perf_datastore_api_SOURCES = \ | 132 | perf_datastore_api_mysql_SOURCES = \ |
92 | perf_datastore_api.c | 133 | perf_datastore_api.c |
93 | perf_datastore_api_LDADD = \ | 134 | perf_datastore_api_mysql_LDADD = \ |
94 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ | 135 | $(top_builddir)/src/datastore/libgnunetdatastore.la \ |
95 | $(top_builddir)/src/util/libgnunetutil.la | 136 | $(top_builddir)/src/util/libgnunetutil.la |
96 | 137 | ||
97 | perf_plugin_datastore_SOURCES = \ | 138 | perf_plugin_datastore_mysql_SOURCES = \ |
98 | perf_plugin_datastore.c | 139 | perf_plugin_datastore.c |
99 | perf_plugin_datastore_LDADD = \ | 140 | perf_plugin_datastore_mysql_LDADD = \ |
100 | $(top_builddir)/src/util/libgnunetutil.la | 141 | $(top_builddir)/src/util/libgnunetutil.la |
101 | 142 | ||
102 | 143 | ||
103 | EXTRA_DIST = \ | 144 | EXTRA_DIST = \ |
104 | test_datastore_api_data.conf \ | 145 | test_datastore_api_data_sqlite.conf \ |
105 | perf_plugin_datastore_data.conf | 146 | perf_plugin_datastore_data_sqlite.conf \ |
147 | test_datastore_api_data_mysql.conf \ | ||
148 | perf_plugin_datastore_data_mysql.conf | ||