aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/namestore/Makefile.am
blob: 3db174225c2ff680c97baebab011a5c04e98cc9a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include $(POSTGRESQL_CPPFLAGS)

plugindir = $(libdir)/gnunet

pkgcfgdir= $(pkgdatadir)/config.d/

libexecdir= $(pkglibdir)/libexec/

sqldir = $(prefix)/share/gnunet/sql/

sql_DATA = \
  namestore-0001.sql \
  namestore-drop.sql

if USE_COVERAGE
  AM_CFLAGS = --coverage -O0
  XLIBS = -lgcov
endif




plugin_LTLIBRARIES = \
  $(SQLITE_PLUGIN) \
  $(POSTGRES_PLUGIN)


libgnunet_plugin_namestore_sqlite_la_SOURCES = \
  plugin_namestore_sqlite.c
libgnunet_plugin_namestore_sqlite_la_LIBADD = \
  $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la  \
  $(top_builddir)/src/lib/sq/libgnunetsq.la \
  $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
  $(LTLIBINTL)
libgnunet_plugin_namestore_sqlite_la_LDFLAGS = \
 $(GN_PLUGIN_LDFLAGS)

libgnunet_plugin_namestore_postgres_la_SOURCES = \
  plugin_namestore_postgres.c
libgnunet_plugin_namestore_postgres_la_LIBADD = \
  $(top_builddir)/src/lib/gnsrecord/libgnunetgnsrecord.la  \
  $(top_builddir)/src/lib/pq/libgnunetpq.la  \
  $(top_builddir)/src/lib/util/libgnunetutil.la $(XLIBS) -lpq \
  $(LTLIBINTL)
libgnunet_plugin_namestore_postgres_la_LDFLAGS = \
 $(GN_PLUGIN_LDFLAGS) $(POSTGRESQL_LDFLAGS)

if HAVE_SQLITE
SQLITE_PLUGIN = libgnunet_plugin_namestore_sqlite.la
SQLITE_TESTS = test_plugin_namestore_sqlite
endif


if HAVE_POSTGRESQL
POSTGRES_PLUGIN = libgnunet_plugin_namestore_postgres.la
POSTGRES_TESTS = test_plugin_namestore_postgres
endif
if HAVE_SQLITE
check_PROGRAMS = \
 $(SQLITE_TESTS) \
 $(POSTGRES_TESTS)
endif

test_plugin_namestore_sqlite_SOURCES = \
 test_plugin_namestore.c
test_plugin_namestore_sqlite_LDADD = \
  $(top_builddir)/src/lib/util/libgnunetutil.la

test_plugin_namestore_postgres_SOURCES = \
  test_plugin_namestore.c
test_plugin_namestore_postgres_LDADD = \
  $(top_builddir)/src/lib/util/libgnunetutil.la

EXTRA_DIST = \
  test_plugin_namestore_sqlite.conf \
  test_plugin_namestore_postgres.conf \
	$(sql_DATA)