aboutsummaryrefslogtreecommitdiff
path: root/src/backenddb/Makefile.am
blob: a21c209b982dbf11588d5518160c10715a61a37a (plain)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include

plugindir = $(libdir)/taler

pkgcfgdir = $(prefix)/share/taler/config.d/

pkgcfg_DATA = \
  merchantdb-postgres.conf

sqldir = $(prefix)/share/taler/sql/merchant/

sql_DATA = \
  versioning.sql \
  merchant-0001.sql \
  merchant-0002.sql \
  merchant-0003.sql \
  merchant-0004.sql \
  drop.sql

#  merchant-0005.sql \ -- FIXME-#7796


if HAVE_POSTGRESQL
if HAVE_GNUNETPQ
plugin_LTLIBRARIES = \
  libtaler_plugin_merchantdb_postgres.la
endif
endif

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

lib_LTLIBRARIES = \
  libtalermerchantdb.la

libtalermerchantdb_la_SOURCES = \
  merchantdb_plugin.c \
  merchantdb_helper.c

libtalermerchantdb_la_LIBADD = \
  $(LIBGCRYPT_LIBS) \
  -ltalerutil \
  -ltalerpq \
  -lgnunetutil \
  -lltdl \
  $(XLIB)

libtalermerchantdb_la_LDFLAGS = \
  $(POSTGRESQL_LDFLAGS) \
  -version-info 2:0:0 \
  -no-undefined

libtaler_plugin_merchantdb_postgres_la_SOURCES = \
  pg_lookup_transfers.h pg_lookup_transfers.c \
  plugin_merchantdb_postgres.c  pg_helper.h
libtaler_plugin_merchantdb_postgres_la_LIBADD = \
  $(LTLIBINTL)
libtaler_plugin_merchantdb_postgres_la_LDFLAGS = \
  $(TALER_PLUGIN_LDFLAGS) \
  -ltalerpq \
  -ltalerutil \
  -ltalerjson \
  -ltalermhd \
  -lgnunetpq \
  -lgnunetjson \
  -lpq \
  -lgnunetutil \
  $(XLIB)

if HAVE_POSTGRESQL
if HAVE_GNUNETPQ
check_PROGRAMS = \
  test-merchantdb-postgres
endif
endif

test_merchantdb_postgres_SOURCES = \
  test_merchantdb.c

test_merchantdb_postgres_LDFLAGS = \
  -ltalerutil \
  -ltalerjson \
  -lgnunetjson \
  -lgnunetutil \
  -ljansson \
  $(XLIB)

test_merchantdb_postgres_LDADD = \
  $(top_builddir)/src/backenddb/libtalermerchantdb.la

TESTS = \
  test-merchantdb-postgres

EXTRA_DIST = \
  test-merchantdb-postgres.conf \
  merchantdb-postgres.conf \
  $(sql_DATA)