Makefile.am 5.17 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 11 12 13 14 15 16 17 18 19 20
	       bin/sdskv-shutdown

check_PROGRAMS = test/sdskv-open-test              \
		 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        \
		 test/sdskv-custom-server-daemon
Matthieu Dorier's avatar
Matthieu Dorier committed
21

Matthieu Dorier's avatar
Matthieu Dorier committed
22
bin_sdskv_server_daemon_SOURCES = src/sdskv-server-daemon.c
Matthieu Dorier's avatar
Matthieu Dorier committed
23
bin_sdskv_server_daemon_DEPENDENCIES = lib/libsdskv-server.la
Matthieu Dorier's avatar
Matthieu Dorier committed
24 25
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
26

27

Matthieu Dorier's avatar
Matthieu Dorier committed
28 29 30 31 32
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

33 34 35 36 37 38 39
#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
40 41 42
		  lib/libsdskv-server.la

lib_libsdskv_client_la_SOURCES = src/sdskv-client.c
43

44
#lib_libkvclient_la_SOURCES = src/kv-client.c
45

46
#lib_libkvgroupclient_la_SOURCES = src/kvgroup-client.cc
47

48 49
#lib_libkvserver_la_SOURCES = src/kv-server.cc \
#			     src/datastore/datastore.cc
Rob Latham's avatar
Rob Latham committed
50

Matthieu Dorier's avatar
Matthieu Dorier committed
51 52 53
lib_libsdskv_server_la_SOURCES = src/sdskv-server.cc \
				 src/datastore/datastore.cc

Rob Latham's avatar
Rob Latham committed
54
if BUILD_BWTREE
55 56
#lib_libkvserver_la_SOURCES += src/BwTree/src/bwtree.cpp \
#			      src/datastore/bwtree_datastore.cc
Matthieu Dorier's avatar
Matthieu Dorier committed
57 58 59

lib_libsdskv_server_la_SOURCES += src/BwTree/src/bwtree.cpp \
				  src/datastore/bwtree_datastore.cc
60 61 62
endif

if BUILD_BDB
63 64
#lib_libkvserver_la_SOURCES += src/datastore/berkeleydb_datastore.cc
#
Matthieu Dorier's avatar
Matthieu Dorier committed
65
lib_libsdskv_server_la_SOURCES += src/datastore/berkeleydb_datastore.cc
66 67 68
endif

if BUILD_LEVELDB
69
#lib_libkvserver_la_SOURCES += src/datastore/leveldb_datastore.cc
Matthieu Dorier's avatar
Matthieu Dorier committed
70 71

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

74
lib_libsdskv_server_la_LIBADD = ${SERVER_LIBS}
75

76 77 78
include_HEADERS = include/sdskv-client.h \
		  include/sdskv-server.h \
		  include/sdskv-common.h
79

80 81
noinst_HEADERS = src/bulk.h \
		 src/sds-keyval.h \
Matthieu Dorier's avatar
Matthieu Dorier committed
82
		 src/sds-keyval-group.h \
83 84
		 src/sdskv-rpc-types.h \
		 src/datastore/datastore.h \
85
		 src/datastore/map_datastore.h \
86 87 88 89
		 src/datastore/bwtree_datastore.h \
		 src/datastore/leveldb_datastore.h \
		 src/datastore/berkeleydb_datastore.h \
		 src/datastore/datastore_factory.h \
90
		 src/keyval-internal.h \
Rob Latham's avatar
Rob Latham committed
91
		 src/BwTree/src/bwtree.h \
92 93 94
		 src/BwTree/src/atomic_stack.h\
		 src/BwTree/src/bloom_filter.h \
		 src/BwTree/src/sorted_small_set.h
Rob Latham's avatar
Rob Latham committed
95

96
#lib_libkvgroupserver_la_SOURCES = src/kvgroup-server.cc
97

Matthieu Dorier's avatar
Matthieu Dorier committed
98

99 100 101 102 103
TESTS = test/basic.sh 		\
	test/open-test.sh 	\
       	test/put-test.sh 	\
	test/length-test.sh 	\
	test/get-test.sh 	\
104
	test/erase-test.sh      \
105
	test/list-keys-test.sh  \
106
	test/list-keyvals-test.sh  \
107 108
	test/list-keys-prefix-test.sh \
	test/custom-cmp-test.sh
Matthieu Dorier's avatar
Matthieu Dorier committed
109 110 111 112

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

Matthieu Dorier's avatar
Matthieu Dorier committed
113 114 115 116 117 118 119
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

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
120

121 122 123 124
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

125 126 127 128
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

129 130 131 132
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

133 134 135 136
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

137 138 139
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
140

Matthieu Dorier's avatar
Matthieu Dorier committed
141 142 143 144
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

145 146 147
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
148

149 150 151 152 153
test_sdskv_custom_server_daemon_SOURCES = test/sdskv-custom-server-daemon.c
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}

154
pkgconfigdir = $(libdir)/pkgconfig
155 156
pkgconfig_DATA = maint/sdskv-server.pc \
		 maint/sdskv-client.pc
157

158

159