diff --git a/compile_leveldb.sh b/compile_leveldb.sh index 6b823c3..31bf6ad 100755 --- a/compile_leveldb.sh +++ b/compile_leveldb.sh @@ -1,3 +1,15 @@ #!/bin/sh -(cd leveldb-read-only; make OPT='-fPIC -O2 -DNDEBUG') +( + cd snappy-read-only; + ./autogen.sh; + ./configure --enable-shared=no --enable-static=yes; + make clean; + make CXXFLAGS='-g -O2 -fPIC'; +) + +( + cd leveldb-read-only; + make clean; + make OPT='-fPIC -O2 -DNDEBUG -DSNAPPY -I../snappy-read-only' SNAPPY_CFLAGS='' +) diff --git a/setup.py b/setup.py index 4e3d149..d8322af 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from distutils.core import setup, Extension extra_compile_args = ['-I./leveldb-read-only/include', '-fPIC', '-pedantic', '-Wall', '-g2', '-D_GNU_SOURCE', '-O2', '-DNDEBUG'] -extra_link_args = ['-L./leveldb-read-only', '-Bstatic', '-lleveldb'] +extra_link_args = ['-L./leveldb-read-only', '-Bstatic', '-lleveldb', '-L./snappy-read-only/.libs/', '-Bstatic', '-lsnappy'] setup( name = 'leveldb',