Makefile.am 6.78 KB
Newer Older
1 2
ACLOCAL_AMFLAGS="-Im4"

3
SERVER_LIBS=@SERVER_LIBS@
4
CLIENT_LiBS=@CLIENT_LIBS@
5

6
AM_CPPFLAGS = -I${srcdir}/src -I${srcdir}/include
Rob Latham's avatar
Rob Latham committed
7

8
bin_PROGRAMS = bin/sdskv-server-daemon 	    \
9 10
	       bin/sdskv-shutdown

Matthieu Dorier's avatar
Matthieu Dorier committed
11 12 13 14
if BUILD_BENCHMARK
bin_PROGRAMS += bin/sdskv-benchmark
endif

15
check_PROGRAMS = test/sdskv-open-test              \
16
		 test/sdskv-list-db-test           \
17 18 19 20 21 22 23 24
		 test/sdskv-put-test               \
		 test/sdskv-length-test            \
		 test/sdskv-get-test               \
		 test/sdskv-erase-test             \
		 test/sdskv-list-keys-test         \
		 test/sdskv-list-keyvals-test      \
		 test/sdskv-list-keys-prefix-test  \
		 test/sdskv-custom-cmp-test        \
25
		 test/sdskv-migrate-test           \
Matthieu Dorier's avatar
Matthieu Dorier committed
26
		 test/sdskv-multi-test             \
27
		 test/sdskv-packed-test            \
28
		 test/sdskv-cxx-test               \
29
		 test/sdskv-custom-server-daemon
Matthieu Dorier's avatar
Matthieu Dorier committed
30

31
bin_sdskv_server_daemon_SOURCES = src/sdskv-server-daemon.cc
Matthieu Dorier's avatar
Matthieu Dorier committed
32
bin_sdskv_server_daemon_DEPENDENCIES = lib/libsdskv-server.la
Matthieu Dorier's avatar
Matthieu Dorier committed
33 34
bin_sdskv_server_daemon_LDFLAGS = -Llib -lsdskv-server
bin_sdskv_server_daemon_LDADD = ${LIBS} -lsdskv-server ${SERVER_LIBS}
Matthieu Dorier's avatar
Matthieu Dorier committed
35

36

Matthieu Dorier's avatar
Matthieu Dorier committed
37 38 39 40 41
bin_sdskv_shutdown_SOURCES = src/sdskv-shutdown.c
bin_sdskv_shutdown_DEPENDENCIES = lib/libsdskv-client.la
bin_sdskv_shutdown_LDFLAGS = -Llib -lsdskv-client
bin_sdskv_shutdown_LDADD = ${LIBS} -lsdskv-client

Matthieu Dorier's avatar
Matthieu Dorier committed
42 43 44 45 46 47 48
if BUILD_BENCHMARK
bin_sdskv_benchmark_SOURCES = src/sdskv-benchmark.cc
bin_sdskv_benchmark_DEPENDENCIES = lib/libsdskv-client.la lib/libsdskv-server.la
bin_sdskv_benchmark_LDFLAGS = -Llib -lsdskv-client -lsdskv-server
bin_sdskv_benchmark_LDADD = ${LIBS} -lsdskv-client -lsdskv-server ${SERVER_LIBS}
endif

49 50 51 52 53 54 55
#lib_LTLIBRARIES = lib/libkvclient.la \
#                  lib/libkvserver.la \
#                  lib/libkvgroupclient.la \
#                  lib/libkvgroupserver.la \
#		   lib/libsdskv-client.la \
#		   lib/libsdskv-server.la
lib_LTLIBRARIES = lib/libsdskv-client.la \
Matthieu Dorier's avatar
Matthieu Dorier committed
56 57 58
		  lib/libsdskv-server.la

lib_libsdskv_client_la_SOURCES = src/sdskv-client.c
59

60
#lib_libkvclient_la_SOURCES = src/kv-client.c
61

62
#lib_libkvgroupclient_la_SOURCES = src/kvgroup-client.cc
63

64 65
#lib_libkvserver_la_SOURCES = src/kv-server.cc \
#			     src/datastore/datastore.cc
Rob Latham's avatar
Rob Latham committed
66

Matthieu Dorier's avatar
Matthieu Dorier committed
67 68 69
lib_libsdskv_server_la_SOURCES = src/sdskv-server.cc \
				 src/datastore/datastore.cc

Rob Latham's avatar
Rob Latham committed
70
if BUILD_BWTREE
71 72
#lib_libkvserver_la_SOURCES += src/BwTree/src/bwtree.cpp \
#			      src/datastore/bwtree_datastore.cc
Matthieu Dorier's avatar
Matthieu Dorier committed
73 74 75

lib_libsdskv_server_la_SOURCES += src/BwTree/src/bwtree.cpp \
				  src/datastore/bwtree_datastore.cc
76 77 78
endif

if BUILD_BDB
79 80
#lib_libkvserver_la_SOURCES += src/datastore/berkeleydb_datastore.cc
#
Matthieu Dorier's avatar
Matthieu Dorier committed
81
lib_libsdskv_server_la_SOURCES += src/datastore/berkeleydb_datastore.cc
82 83 84
endif

if BUILD_LEVELDB
85
#lib_libkvserver_la_SOURCES += src/datastore/leveldb_datastore.cc
Matthieu Dorier's avatar
Matthieu Dorier committed
86 87

lib_libsdskv_server_la_SOURCES += src/datastore/leveldb_datastore.cc
Rob Latham's avatar
Rob Latham committed
88 89
endif

90
lib_libsdskv_server_la_LIBADD = ${SERVER_LIBS}
91

92 93
include_HEADERS = include/sdskv-client.h \
		  include/sdskv-server.h \
94 95 96 97
		  include/sdskv-common.h \
		  include/sdskv-client.hpp \
		  include/sdskv-server.hpp \
		  include/sdskv-common.hpp
98

99
noinst_HEADERS = src/bulk.h \
100 101
		 src/sdskv-rpc-types.h \
		 src/datastore/datastore.h \
102
		 src/datastore/map_datastore.h \
103 104 105 106
		 src/datastore/bwtree_datastore.h \
		 src/datastore/leveldb_datastore.h \
		 src/datastore/berkeleydb_datastore.h \
		 src/datastore/datastore_factory.h \
107
		 src/BwTree/src/bwtree.h \
108 109 110
		 src/BwTree/src/atomic_stack.h\
		 src/BwTree/src/bloom_filter.h \
		 src/BwTree/src/sorted_small_set.h
Matthieu Dorier's avatar
Matthieu Dorier committed
111 112 113
#		 src/sds-keyval.h \
#		 src/sds-keyval-group.h \
#		 src/keyval-internal.h 
114

115
#lib_libkvgroupserver_la_SOURCES = src/kvgroup-server.cc
116

Matthieu Dorier's avatar
Matthieu Dorier committed
117

118 119
TESTS = test/basic.sh 		\
	test/open-test.sh 	\
120
	test/list-db-test.sh	\
121 122 123
       	test/put-test.sh 	\
	test/length-test.sh 	\
	test/get-test.sh 	\
124
	test/erase-test.sh      \
125
	test/list-keys-test.sh  \
126
	test/list-keyvals-test.sh  \
127
	test/list-keys-prefix-test.sh \
128
	test/migrate-test.sh    \
Matthieu Dorier's avatar
Matthieu Dorier committed
129
	test/custom-cmp-test.sh \
130
	test/multi-test.sh \
131
	test/packed-test.sh \
132
	test/cxx-test.sh
Matthieu Dorier's avatar
Matthieu Dorier committed
133 134 135 136

TESTS_ENVIRONMENT = TIMEOUT="$(TIMEOUT)" \
		    MKTEMP="$(MKTEMP)"

Matthieu Dorier's avatar
Matthieu Dorier committed
137 138 139 140
test_sdskv_open_test_SOURCES = test/sdskv-open-test.cc
test_sdskv_open_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_open_test_LDFLAGS = -Llib -lsdskv-client

141 142 143 144
test_sdskv_list_db_test_SOURCES = test/sdskv-list-db-test.cc
test_sdskv_list_db_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_list_db_test_LDFLAGS = -Llib -lsdskv-client

Matthieu Dorier's avatar
Matthieu Dorier committed
145 146 147
test_sdskv_put_test_SOURCES = test/sdskv-put-test.cc
test_sdskv_put_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_put_test_LDFLAGS = -Llib -lsdskv-client
148

149 150 151 152
test_sdskv_length_test_SOURCES = test/sdskv-length-test.cc
test_sdskv_length_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_length_test_LDFLAGS = -Llib -lsdskv-client

153 154 155 156
test_sdskv_get_test_SOURCES = test/sdskv-get-test.cc
test_sdskv_get_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_get_test_LDFLAGS = -Llib -lsdskv-client

157 158 159 160
test_sdskv_list_keys_test_SOURCES = test/sdskv-list-keys-test.cc
test_sdskv_list_keys_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_list_keys_test_LDFLAGS = -Llib -lsdskv-client

161 162 163 164
test_sdskv_list_keys_prefix_test_SOURCES = test/sdskv-list-keys-prefix-test.cc
test_sdskv_list_keys_prefix_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_list_keys_prefix_test_LDFLAGS = -Llib -lsdskv-client

165 166 167
test_sdskv_list_keyvals_test_SOURCES = test/sdskv-list-kv-test.cc
test_sdskv_list_keyvals_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_list_keyvals_test_LDFLAGS = -Llib -lsdskv-client
168

Matthieu Dorier's avatar
Matthieu Dorier committed
169 170 171 172
test_sdskv_erase_test_SOURCES = test/sdskv-erase-test.cc
test_sdskv_erase_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_erase_test_LDFLAGS = -Llib -lsdskv-client

173 174 175
test_sdskv_custom_cmp_test_SOURCES = test/sdskv-custom-cmp-test.cc
test_sdskv_custom_cmp_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_custom_cmp_test_LDFLAGS = -Llib -lsdskv-client
176

177
test_sdskv_custom_server_daemon_SOURCES = test/sdskv-custom-server-daemon.cc
178 179 180 181
test_sdskv_custom_server_daemon_DEPENDENCIES = lib/libsdskv-server.la
test_sdskv_custom_server_daemon_LDFLAGS = -Llib -lsdskv-server
test_sdskv_custom_server_daemon_LDADD = ${LIBS} -lsdskv-server ${SERVER_LIBS}

182 183 184 185
test_sdskv_migrate_test_SOURCES = test/sdskv-migrate-test.cc
test_sdskv_migrate_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_migrate_test_LDFLAGS = -Llib -lsdskv-client

Matthieu Dorier's avatar
Matthieu Dorier committed
186 187 188 189
test_sdskv_multi_test_SOURCES = test/sdskv-multi-test.cc
test_sdskv_multi_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_multi_test_LDFLAGS = -Llib -lsdskv-client

190 191 192 193
test_sdskv_packed_test_SOURCES = test/sdskv-packed-test.cc
test_sdskv_packed_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_packed_test_LDFLAGS = -Llib -lsdskv-client

194 195 196 197
test_sdskv_cxx_test_SOURCES = test/sdskv-cxx-test.cc
test_sdskv_cxx_test_DEPENDENCIES = lib/libsdskv-client.la
test_sdskv_cxx_test_LDFLAGS = -Llib -lsdskv-client

198
pkgconfigdir = $(libdir)/pkgconfig
199 200
pkgconfig_DATA = maint/sdskv-server.pc \
		 maint/sdskv-client.pc
201

202

203