forked from rescrv/HyperDex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
483 lines (411 loc) · 16.4 KB
/
Makefile.am
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
## Copyright (c) 2012, Cornell University
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are met:
##
## * Redistributions of source code must retain the above copyright notice,
## this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
## * Neither the name of HyperDex nor the names of its contributors may be
## used to endorse or promote products derived from this software without
## specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_CPPFLAGS = $(E_CPPFLAGS)
AM_CXXFLAGS = $(WANAL_CXXFLAGS) $(COVERAGE_CXXFLAGS)
EXTRA_DIST = \
LICENSE \
doc \
doc/HyperDex-$(VERSION).pdf \
hyperdex-coordinator \
hyperdex-coordinator-control \
$(libhyperclient_extra_dist) \
$(ycsb_extra_dist) \
hyperclient/nodejs/sync_test.js \
hyperclient/nodejs/async_test.js \
hyperclient/nodejs/hyperclient.cc \
wscript
lib_LTLIBRARIES = \
libhyperspacehashing.la \
libhyperclient.la
pyexec_LTLIBRARIES =
include_HEADERS = \
hyperdex.h
noinst_HEADERS = \
$(libhyperspacehashing_noinst_headers) \
$(libhyperdex_noinst_headers) \
$(libhyperclient_noinst_headers)
bin_PROGRAMS = \
hyperdex-daemon \
hyperdex-replication-stress-test \
hyperdex-search-stress-test \
hyperdex-simple-consistency-stress-test
noinst_PROGRAMS = \
$(libhyperspacehashing_noinst_programs) \
hyperclient/c/testcompile
check_PROGRAMS = \
daemon/test/index_encode
TESTS = daemon/test/index_encode
bin_SCRIPTS = \
hyperdex-coordinator \
hyperdex-coordinator-control
nobase_python_PYTHON = \
hypercoordinator/__init__.py \
hypercoordinator/client.py \
hypercoordinator/coordinator.py \
hypercoordinator/hdtypes.py \
hypercoordinator/hdjson.py \
hypercoordinator/parser.py
CLEANFILES = \
$(java_bindings_cleanfiles) \
$(ycsb_cleanfiles)
JAVAROOT = $(abs_top_srcdir)
.PHONY: coverage doc/HyperDex-$(VERSION).pdf
dist-hook:
rm -rf $(distdir)/doc/_build
################################################################################
############################## Hyperspace Hashing ##############################
################################################################################
#################################### Library ###################################
libhyperspacehashing_includedir = $(includedir)/hyperspacehashing
libhyperspacehashing_include_HEADERS = \
hyperspacehashing/hyperspacehashing/hashes.h \
hyperspacehashing/hyperspacehashing/prefix.h \
hyperspacehashing/hyperspacehashing/search.h
libhyperspacehashing_noinst_headers = \
hyperspacehashing/bithacks.h \
hyperspacehashing/cfloat.h \
hyperspacehashing/hashes_internal.h \
hyperspacehashing/range_match.h
libhyperspacehashing_la_SOURCES = \
hyperspacehashing/cfloat.cc \
hyperspacehashing/hashes.cc \
hyperspacehashing/prefix.cc \
hyperspacehashing/range_match.cc \
hyperspacehashing/search.cc
libhyperspacehashing_la_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
$(E_CFLAGS) \
$(CPPFLAGS)
libhyperspacehashing_la_LIBADD = \
$(E_LIBS) \
-lcityhash
################################################################################
################################### HyperDex ###################################
################################################################################
#################################### Library ###################################
libhyperdex_noinst_headers = \
hyperdex/hyperdex/configuration.h \
hyperdex/hyperdex/configuration_parser.h \
hyperdex/hyperdex/coordinatorlink.h \
hyperdex/hyperdex/ids.h \
hyperdex/hyperdex/instance.h \
hyperdex/hyperdex/network_constants.h
libhyperdex_sources = \
hyperdex/configuration.cc \
hyperdex/configuration_parser.cc \
hyperdex/coordinatorlink.cc
################################################################################
################################## HyperDaemon #################################
################################################################################
hyperdex_daemon_SOURCES = \
daemon.cc \
common/attribute.cc \
common/attribute_check.cc \
common/funcall.cc \
common/schema.cc \
common/serialization.cc \
daemon/daemon.cc \
daemon/datalayer.cc \
daemon/index_encode.cc \
daemon/search_manager.cc \
hyperdaemon/logical.h \
hyperdaemon/logical.cc \
hyperdaemon/replication/clientop.h \
hyperdaemon/replication/keypair.h \
hyperdaemon/replication_manager.h \
hyperdaemon/replication_manager.cc \
hyperdaemon/replication_manager_deferred.h \
hyperdaemon/replication_manager_keyholder.h \
hyperdaemon/replication_manager_pending.h \
hyperdaemon/runtimeconfig.h \
hyperdaemon/runtimeconfig.cc \
datatypes/alltypes.h \
datatypes/apply.h \
datatypes/apply.cc \
datatypes/compare.h \
datatypes/compare.cc \
datatypes/float.h \
datatypes/float.cc \
datatypes/int64.h \
datatypes/int64.cc \
datatypes/list.h \
datatypes/list.cc \
datatypes/map.h \
datatypes/map.cc \
datatypes/microerror.h \
datatypes/set.h \
datatypes/set.cc \
datatypes/sort.h \
datatypes/step.h \
datatypes/step.cc \
datatypes/string.h \
datatypes/string.cc \
datatypes/validate.h \
datatypes/validate.cc \
datatypes/write.h \
datatypes/write.cc \
${libhyperdex_sources}
hyperdex_daemon_LDADD = \
libhyperspacehashing.la \
$(E_LIBS) \
$(BUSYBEE_LIBS) -lleveldb \
-lbusybee-mta \
$(COVERAGE_LDADD) \
-lcityhash -lpopt -lglog -lrt -lpthread
hyperdex_daemon_LDFLAGS = -no-install
hyperdex_daemon_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
$(E_CFLAGS) \
$(CPPFLAGS)
################################################################################
################################## HyperClient #################################
################################################################################
#################################### Library ###################################
libhyperclient_extra_dist = \
hyperclient/java/hyperclient.i \
hyperclient/python/hyperclient.pyx
libhyperclient_includedir = $(includedir)
libhyperclient_include_HEADERS = \
hyperclient/hyperclient.h
libhyperclient_noinst_headers = \
hyperclient/constants.h \
hyperclient/hyperclient_completedop.h \
hyperclient/hyperclient_pending.h \
hyperclient/hyperclient_pending_count.h \
hyperclient/hyperclient_pending_get.h \
hyperclient/hyperclient_pending_group_del.h \
hyperclient/hyperclient_pending_search.h \
hyperclient/hyperclient_pending_sorted_search.h \
hyperclient/hyperclient_pending_statusonly.h \
hyperclient/util.h
libhyperclient_la_SOURCES = \
common/attribute.cc \
common/attribute_check.cc \
common/funcall.cc \
common/schema.cc \
common/serialization.cc \
datatypes/coercion.h \
datatypes/coercion.cc \
datatypes/compare.cc \
datatypes/float.cc \
datatypes/int64.cc \
datatypes/list.cc \
datatypes/map.cc \
datatypes/set.cc \
datatypes/step.cc \
datatypes/string.cc \
datatypes/validate.cc \
datatypes/write.cc \
hyperclient/hyperclient.cc \
hyperclient/hyperclient_c_wrappers.cc \
hyperclient/hyperclient_pending.cc \
hyperclient/hyperclient_pending_count.cc \
hyperclient/hyperclient_pending_get.cc \
hyperclient/hyperclient_pending_group_del.cc \
hyperclient/hyperclient_pending_search.cc \
hyperclient/hyperclient_pending_sorted_search.cc \
hyperclient/hyperclient_pending_statusonly.cc \
hyperclient/keyop_info.cc \
hyperclient/util.cc \
${libhyperdex_sources}
libhyperclient_la_LIBADD = \
libhyperspacehashing.la \
$(E_LIBS) \
$(BUSYBEE_LIBS) \
-lbusybee-st \
$(COVERAGE_LDADD)
libhyperclient_la_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
-I$(abs_top_srcdir)/hyperdex \
$(E_CFLAGS) \
$(CPPFLAGS)
gperf_verbose = $(gperf_verbose_$(V))
gperf_verbose_ = $(gperf_verbose_$(AM_DEFAULT_VERBOSITY))
gperf_verbose_0 = @echo " GPERF " $@;
hyperclient/keyop_info.cc: hyperclient/keyop_info.gperf
$(gperf_verbose)gperf -m 100 $(abs_top_srcdir)/hyperclient/keyop_info.gperf --output-file=$(abs_top_builddir)/hyperclient/keyop_info.cc
################################# Java Bindings ################################
java_bindings_cleanfiles = \
$(hyperclient_jarfile) \
hyperclient/java/hyperclient_wrap.cxx \
hyperclient/java/hyperclient/*.java \
hyperclient/java/hyperclient/*.class \
hyperclient-java.stamp
nodist_libhyperclient_java_la_SOURCES = hyperclient/java/hyperclient_wrap.cxx
libhyperclient_java_la_CPPFLAGS = \
$(JNI_CPPFLAGS) \
$(CPPFLAGS)
libhyperclient_java_la_CXXFLAGS = \
-fno-strict-aliasing
libhyperclient_java_la_LIBADD = \
libhyperspacehashing.la \
libhyperclient.la \
$(PYTHON_LDFLAGS) \
$(COVERAGE_LDADD)
hyperclient/java/hyperclient_wrap.cxx: hyperclient/java/hyperclient.i hyperclient/hyperclient.h
mkdir -p hyperclient/java/hyperclient
${SWIG} -java -package hyperclient -outdir $(abs_builddir)/hyperclient/java/hyperclient \
-o $(abs_builddir)/hyperclient/java/hyperclient_wrap.cxx -w518 $(abs_top_srcdir)/hyperclient/java/hyperclient.i
hyperclient_jarfile = hyperclient-$(VERSION).jar
hyperclient-java.stamp: hyperclient/java/hyperclient_wrap.cxx
cp hyperclient/java/extra_src/*.java hyperclient/java/hyperclient/.
javac hyperclient/java/hyperclient/*.java
date > hyperclient-java.stamp
$(hyperclient_jarfile): hyperclient-java.stamp
cd $(abs_top_builddir)/hyperclient/java ; $(JAR) cvf $(JARFLAGS) $(abs_top_builddir)/$(hyperclient_jarfile) hyperclient/*.class
if ENABLE_JAVA_BINDINGS
lib_LTLIBRARIES += libhyperclient-java.la
hyperclientjardir = $(datadir)/java
hyperclientjar_DATA = $(hyperclient_jarfile)
endif
################################ Python Bindings ###############################
if ENABLE_PYTHON_BINDINGS
pyexec_LTLIBRARIES += \
hyperclient/python/hyperclient.la
endif
pyx_verbose = $(pyx_verbose_$(V))
pyx_verbose_ = $(pyx_verbose_$(AM_DEFAULT_VERBOSITY))
pyx_verbose_0 = @echo " PYX " $@;
hyperclient/python/hyperclient.c: hyperclient/python/hyperclient.pyx
$(pyx_verbose)cython hyperclient/python/hyperclient.pyx
hyperclient_python_hyperclient_la_SOURCES = \
hyperclient/python/hyperclient.c
hyperclient_python_hyperclient_la_CPPFLAGS = \
$(PYTHON_CPPFLAGS) \
$(CPPFLAGS)
hyperclient_python_hyperclient_la_LIBADD = \
libhyperspacehashing.la \
libhyperclient.la \
$(PYTHON_LDFLAGS) \
$(COVERAGE_LDADD)
hyperclient_python_hyperclient_la_LDFLAGS = \
-module \
-avoid-version \
-export-symbols-regex inithyperclient
################################## C Bindings ##################################
hyperclient_c_testcompile_SOURCES = hyperclient/c/testcompile.c
hyperclient_c_testcompile_CPPFLAGS = -I$(abs_top_srcdir)/hyperclient
################################################################################
################################## Benchmarks ##################################
################################################################################
##################################### YCSB #####################################
ycsb_extra_dist = \
ycsb/hyperclient/HyperClientYCSB.java
ycsb_cleanfiles = \
$(ycsb_jarfile) \
ycsb/hyperclient/HyperClientYCSB.class
ycsb_jarfile = hyperclient-ycsb-$(VERSION).jar
ycsb/hyperclient/HyperClientYCSB.class: $(hyperclient_jarfile) ycsb/hyperclient/HyperClientYCSB.java
mkdir -p $(abs_top_builddir)/ycsb/hyperclient
javac -cp $(abs_top_builddir)/$(hyperclient_jarfile):$(CLASSPATH) -d $(abs_top_builddir)/ycsb $(abs_top_srcdir)/ycsb/hyperclient/HyperClientYCSB.java
$(ycsb_jarfile): ycsb/hyperclient/HyperClientYCSB.class
cd $(abs_top_builddir)/ycsb; $(JAR) cvf $(JARFLAGS) $(abs_top_builddir)/$(ycsb_jarfile) hyperclient/HyperClientYCSB.class
if ENABLE_YCSB_DRIVER
ycsbjardir = $(datadir)/java
ycsbjar_DATA = $(ycsb_jarfile)
endif
################################################################################
################################### Binaries ###################################
################################################################################
hyperdex_replication_stress_test_SOURCES = \
replication-stress-test.cc
hyperdex_replication_stress_test_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
$(E_CFLAGS) \
$(CPPFLAGS)
hyperdex_replication_stress_test_LDADD = \
libhyperspacehashing.la \
libhyperclient.la \
-lpopt
hyperdex_search_stress_test_SOURCES = search-stress-test.cc test/common.cc
hyperdex_search_stress_test_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperspacehashing \
$(E_CFLAGS) \
$(CPPFLAGS)
hyperdex_search_stress_test_LDADD = \
libhyperspacehashing.la \
libhyperclient.la \
-lpopt
hyperdex_search_stress_test_LDFLAGS = -no-install
hyperdex_simple_consistency_stress_test_SOURCES = \
simple-consistency-stress-test.cc
hyperdex_simple_consistency_stress_test_CPPFLAGS = \
-I$(abs_top_srcdir)/hyperclient \
$(E_CFLAGS) \
$(CPPFLAGS)
hyperdex_simple_consistency_stress_test_LDADD = \
libhyperclient.la \
-lpopt -lpthread
if ENABLE_TRACEPLAYER
bin_PROGRAMS += hyperdex-trace-player
hyperdex_trace_player_SOURCES = \
trace-player.cc
hyperdex_trace_player_LDADD = \
libhyperclient.la \
-lbsd \
-lrt
hyperdex_trace_player_CPPFLAGS = \
$(E_CFLAGS) \
$(CPPFLAGS)
endif
daemon_test_index_encode_SOURCES = runner.cc daemon/test/index_encode.cc daemon/index_encode.cc
daemon_test_index_encode_CPPFLAGS = $(GTEST_CPPFLAGS) $(CPPFLAGS)
daemon_test_index_encode_LDADD = $(GTEST_LDFLAGS) -lgtest -lpthread
################################################################################
################################# Documentation ################################
################################################################################
# These need to be chained so that they'll only build once, and will not rely
# upon a PHONY rule.
doc/man/hyperdex-replication-stress-test.1: doc/man/hyperdex-replication-stress-test.rst doc/man/hyperdex-simple-consistency-stress-test.1
doc/man/hyperdex-simple-consistency-stress-test.1: doc/man/hyperdex-simple-consistency-stress-test.rst doc/man/hyperdex-daemon.1
doc/man/hyperdex-daemon.1: doc/man/hyperdex-daemon.rst
sphinx-build -W -d ${abs_top_builddir}/doc/_build -b man doc doc/man
doc/HyperDex-$(VERSION).pdf:
sphinx-build -W -d ${abs_top_builddir}/doc/_build -b latex ${abs_top_srcdir}/doc ${abs_top_builddir}/doc/_build/latex
make -C ${abs_top_builddir}/doc/_build/latex all-pdf
cp ${abs_top_builddir}/doc/_build/latex/HyperDex.pdf doc/HyperDex-$(VERSION).pdf
################################################################################
################################### Coverage ###################################
################################################################################
if ENABLE_COVERAGE
coverage: coverage.dat
mkdir -p coverage
genhtml --function-coverage --branch-coverage --demangle-cpp --output coverage $(abs_top_builddir)/coverage.dat
coverage.dat: check
lcov --directory $(abs_top_builddir) --compat-libtool --capture --output $(abs_top_builddir)/coverage.dat
lcov --extract $(abs_top_builddir)/coverage.dat $(abs_top_builddir)/'*' --output $(abs_top_builddir)/coverage.dat
clean-coverage:
rm -f coverage.dat
rm -rf coverage/
find $(abs_top_builddir) -type f -iname '*.gcda' -delete
find $(abs_top_builddir) -type f -iname '*.gcno' -delete
clean-local: clean-coverage
else
coverage:
@echo Coverage not configured.
endif