From 169b6c9057dd783af313ba2c03d64246e76796f9 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 25 Apr 2013 18:36:20 -0700 Subject: [PATCH] Updates. --- LEVELDB.txt | 22 +++++++--------------- SConstruct | 4 ++-- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/LEVELDB.txt b/LEVELDB.txt index a0fcca658a..73b6e5bb8d 100644 --- a/LEVELDB.txt +++ b/LEVELDB.txt @@ -1,24 +1,16 @@ To use LevelDB, follow these steps: -1) Obtain the latest LevelDB package from http://code.google.com/p/leveldb/ -1.9.0 is known to work. Build it. +1) At the top of the directory tree, type: + make -C src/cpp/level/db libleveldb.a -2) In the SConstruct file, change "LevelDB = bool(0)" to -"LevelDB = bool(1)". +2) In the SConstruct file, change + LevelDB = bool(0) +to + LevelDB = bool(1) -3) In your main directory, create a 'leveldb' directory with 'include' and -'lib' subdirectories. - -4) In the 'leveldb/lib' file, place the 'libleveldb.a' file you built. - -5) Make a 'levedb/include/leveldb' directory. Place the leveldb header files -(leveldb.h, slice.h, and so on) in this directory. - -6) Compile with 'scons'. +3) Compile with 'scons'. There is no import or export method, so your server will have to refetch all nodes. For simplicity, we recommend clearing your entire 'db' directory. LevelDB will store the hash nodes in a 'db/hashnode' directory. - - diff --git a/SConstruct b/SConstruct index d9a28b2cd6..79fa8b2605 100644 --- a/SConstruct +++ b/SConstruct @@ -115,8 +115,8 @@ if OSX: env.Append(CXXFLAGS = ['-I/usr/local/opt/openssl/include']) if LevelDB: - env.Append(CXXFLAGS = [ '-Ileveldb/include', '-DUSE_LEVELDB']) - env.Append(LINKFLAGS = [ '-Lleveldb/lib' ]) + env.Append(CXXFLAGS = [ '-Isrc/cpp/leveldb/include', '-DUSE_LEVELDB']) + env.Append(LINKFLAGS = [ '-Lsrc/cpp/leveldb/lib' ]) env.Append(LIBS = [ '-lleveldb']) DB_SRCS = glob.glob('src/cpp/database/*.c') + glob.glob('src/cpp/database/*.cpp')