lbry-rocksdb/Makefile

45 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

2021-08-18 22:40:01 +02:00
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
2021-08-18 23:18:09 +02:00
(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 \
2021-08-18 23:18:09 +02:00
-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
2021-08-18 22:40:01 +02:00
clean:
2021-08-18 23:18:09 +02:00
rm -rf src/rocksdb/build
2021-08-18 22:40:01 +02:00
make -C src/rocksdb clean