FreeBSD/src/kv/Makefile.am: Fix NPROC and add compilerflags

- Silence the Clang compiler on a warning
 - augment the getting of FreeBSD number of CPUs
	NPROC = nproc needs to be conditional as well since
	it will otherwise be executed anyways.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
This commit is contained in:
Willem Jan Withagen 2016-03-24 13:05:18 +01:00
parent 8b6307cdd9
commit 7908f8de20

View File

@ -16,12 +16,17 @@ if WITH_SLIBROCKSDB
# build rocksdb with its own makefile
# for some stupid reason this needs -fPIC...
# PORTABLE=1 fixes the aarch64 build (-march=native doesn't work there)
NPROC = nproc
ROCKSDBCXX_FLAGS = "-fPIC"
if FREEBSD
NPROC = sysctl -n hw.ncpu
NPROC = sysctl -n hw.ncpu
ROCKSDBCXX_FLAGS += "-Wmismatched-tags"
else
NPROC = nproc
endif
rocksdb/librocksdb.a:
cd rocksdb && CC="${CC}" CXX="${CXX}" EXTRA_CXXFLAGS=-fPIC PORTABLE=1 $(MAKE) -j$(shell ${NPROC}) static_lib
cd rocksdb && CC="${CC}" CXX="${CXX}" EXTRA_CXXFLAGS="${ROCKSDBCXX_FLAGS}" PORTABLE=1 ${MAKE} -j$(shell ${NPROC}) static_lib
libkv_a_CXXFLAGS += -I rocksdb/include -fPIC
libkv_a_SOURCES += kv/RocksDBStore.cc
libkv_a_LIBADD += rocksdb/librocksdb.a