aboutsummaryrefslogtreecommitdiff
path: root/src/namecache/Makefile.am
blob: eee9885d0b14087c0d8981b4708aae5f1de459f0 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
AM_CPPFLAGS = -I$(top_srcdir)/src/include

plugindir = $(libdir)/gnunet

pkgcfgdir= $(pkgdatadir)/config.d/

libexecdir= $(pkglibdir)/libexec/

pkgcfg_DATA = \
   namecache.conf


if MINGW
  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
endif

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

if HAVE_SQLITE
SQLITE_PLUGIN = libgnunet_plugin_namecache_sqlite.la
if HAVE_TESTING
SQLITE_TESTS = test_plugin_namecache_sqlite
endif
endif

if HAVE_POSTGRESQL
POSTGRES_PLUGIN = libgnunet_plugin_namecache_postgres.la
if HAVE_TESTING
POSTGRES_TESTS = test_plugin_namecache_postgres
endif
endif

# testcases do not even build yet; thus: experimental!
if HAVE_TESTING
TESTING_TESTS = \
 test_namecache_api_cache_block
endif

if HAVE_SQLITE
check_PROGRAMS = \
 $(SQLITE_TESTS) \
 $(POSTGRES_TESTS) \
 $(TESTING_TESTS)
endif

if ENABLE_TEST_RUN
AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
TESTS = \
  $(check_PROGRAMS)
endif

lib_LTLIBRARIES = \
  libgnunetnamecache.la


libgnunetnamecache_la_SOURCES = \
  namecache_api.c \
  namecache.h
libgnunetnamecache_la_LIBADD = \
  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  $(GN_LIBINTL)
libgnunetnamecache_la_LDFLAGS = \
  $(GN_LIB_LDFLAGS) $(WINFLAGS) \
  -version-info 0:0:0


libexec_PROGRAMS = \
 gnunet-service-namecache

bin_PROGRAMS = \
 gnunet-namecache

gnunet_namecache_SOURCES = \
 gnunet-namecache.c
gnunet_namecache_LDADD = \
  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunetnamecache.la \
  $(GN_LIBINTL)
gnunet_namecache_DEPENDENCIES = \
  $(top_builddir)/src/identity/libgnunetidentity.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunetnamecache.la


gnunet_service_namecache_SOURCES = \
 gnunet-service-namecache.c

gnunet_service_namecache_LDADD = \
  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunetnamecache.la \
  $(GN_LIBINTL)
gnunet_service_namecache_DEPENDENCIES = \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunetnamecache.la


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

libgnunet_plugin_namecache_sqlite_la_SOURCES = \
  plugin_namecache_sqlite.c
libgnunet_plugin_namecache_sqlite_la_LIBADD = \
  $(top_builddir)/src/namecache/libgnunetnamecache.la  \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lsqlite3 \
  $(LTLIBINTL)
libgnunet_plugin_namecache_sqlite_la_LDFLAGS = \
 $(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_namecache_sqlite_la_DEPENDENCIES = \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunetnamecache.la


libgnunet_plugin_namecache_postgres_la_SOURCES = \
  plugin_namecache_postgres.c
libgnunet_plugin_namecache_postgres_la_LIBADD = \
  $(top_builddir)/src/namecache/libgnunetnamecache.la  \
  $(top_builddir)/src/postgres/libgnunetpostgres.la  \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/util/libgnunetutil.la $(XLIBS) -lpq \
  $(LTLIBINTL)
libgnunet_plugin_namecache_postgres_la_LDFLAGS = \
 $(GN_PLUGIN_LDFLAGS)
libgnunet_plugin_namecache_postgres_la_DEPENDENCIES = \
  $(top_builddir)/src/postgres/libgnunetpostgres.la  \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  libgnunetnamecache.la

test_namecache_api_cache_block_SOURCES = \
 test_namecache_api_cache_block.c
test_namecache_api_cache_block_LDADD = \
  $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
  $(top_builddir)/src/namecache/libgnunetnamecache.la \
  $(top_builddir)/src/testing/libgnunettesting.la \
  $(top_builddir)/src/util/libgnunetutil.la

test_plugin_namecache_sqlite_SOURCES = \
 test_plugin_namecache.c
test_plugin_namecache_sqlite_LDADD = \
 $(top_builddir)/src/testing/libgnunettesting.la \
 $(top_builddir)/src/util/libgnunetutil.la

test_plugin_namecache_postgres_SOURCES = \
 test_plugin_namecache.c
test_plugin_namecache_postgres_LDADD = \
 $(top_builddir)/src/testing/libgnunettesting.la \
 $(top_builddir)/src/util/libgnunetutil.la

EXTRA_DIST = \
  test_namecache_api.conf \
  test_plugin_namecache_sqlite.conf \
  test_plugin_namecache_postgres.conf