forked from lbryio/lbry-rocksdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (39 loc) · 1.07 KB
/
Makefile
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
all: src/rocksdb/librocksdb.a
JOBS=8
src/rocksdb/librocksdb.a:
make \
-e EXTRA_CXXFLAGS="-fPIC" \
-e EXTRA_CFLAGS="-fPIC" \
-C src/rocksdb \
-j $(JOBS) \
libsnappy.a \
liblz4.a \
libbz2.a \
libzstd.a \
libz.a
(cd src/rocksdb && mkdir -p build && cd build && cmake \
-DWITH_SNAPPY=1 \
-DWITH_LZ4=1 \
-DWITH_ZLIB=1 \
-DWITH_ZSTD=1 \
-DWITH_GFLAGS=0 \
-DROCKSDB_BUILD_SHARED=0 \
-DWITH_TOOLS=0 \
-DWITH_BENCHMARK_TOOLS=0 \
-DWITH_CORE_TOOLS=0 \
-DWITH_JEMALLOC=0 \
-DCMAKE_BUILD_TYPE=Release \
-DSnappy_INCLUDE_DIRS=../snappy-1.1.8/ \
-DSnappy_LIBRARIES=../snappy-1.1.8/build \
-Dlz4_INCLUDE_DIRS=../lz4-1.9.3/lib \
-Dlz4_LIBRARIES=../lz4-1.9.3/lib \
-Dzstd_INCLUDE_DIRS=../zstd-1.4.9/lib \
-Dzstd_LIBRARIES=../zstd-1.4.9/lib \
-DZLIB_INCLUDE_DIR=../zlib-1.2.12 \
-DZLIB_LIBRARY=./zlib-1.2.12 \
-DCMAKE_CXX_FLAGS="-fPIC -I../snappy-1.1.8/build -I../zstd-1.4.9/lib/dictBuilder" \
.. && make -j $(JOBS))
cp src/rocksdb/build/librocksdb.a src/rocksdb/librocksdb.a
clean:
rm -rf src/rocksdb/build
make -C src/rocksdb clean