aboutsummaryrefslogtreecommitdiff
path: root/src/lib/pq/Makefile.am
blob: 1884fc8685b6c3e78cb8f49fed4265b559a14148 (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
# This Makefile.am is in the public domain
AM_CPPFLAGS = -I$(top_srcdir)/src/include $(POSTGRESQL_CPPFLAGS)

if USE_COVERAGE
  AM_CFLAGS = --coverage
endif

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

sql_DATA = \
  versioning.sql

EXTRA_DIST = \
  $(sql_DATA)

if HAVE_POSTGRESQL
lib_LTLIBRARIES = libgnunetpq.la
endif

libgnunetpq_la_SOURCES = \
  pq.c \
  pq.h \
  pq_connect.c \
  pq_eval.c \
  pq_event.c \
  pq_exec.c \
  pq_prepare.c \
  pq_query_helper.c \
  pq_result_helper.c
libgnunetpq_la_LIBADD = -lpq \
 $(top_builddir)/src/lib/util/libgnunetutil.la
libgnunetpq_la_LDFLAGS = \
 $(POSTGRESQL_LDFLAGS) \
 $(GN_LIB_LDFLAGS) \
  -version-info 5:0:0

if ENABLE_TEST_RUN
AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
TESTS = \
 test_pq
endif

check_PROGRAMS= \
 test_pq

test_pq_SOURCES = \
  test_pq.c
test_pq_LDADD = \
  libgnunetpq.la \
  $(top_builddir)/src/lib/util/libgnunetutil.la  \
  -lpq $(XLIB)