Skip to content

Commit eeca91c

Browse files
Fix to build script to clean sqlcipher core during clean phase, also cleaned up Android.mk build script for sqlcipher
1 parent 3700a9d commit eeca91c

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ build-java:
2525

2626
clean:
2727
ant clean
28-
cd external/ && ndk-build clean
28+
cd external/ && ndk-build clean
29+
cd external/sqlcipher && make clean
2930
cd jni/ && ndk-build clean
3031
-rm ${LIBRARY_ROOT}/armeabi/libsqlcipher_android.so
3132
-rm ${LIBRARY_ROOT}/armeabi/libdatabase_sqlcipher.so

external/Android.mk

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,13 @@ LOCAL_PATH := $(PROJECT_ROOT_PATH)
1010
LOCAL_PRELINK_MODULE := false
1111

1212
# how on earth to you make this damn Android build system run cmd line progs?!?!
13-
build-local-hack: sqlcipher/sqlite3.c ../obj/local/armeabi/libcrypto.so
13+
build-local-hack: sqlcipher/sqlite3.c
1414

1515
sqlcipher/sqlite3.c:
16-
cd sqlcipher && ./configure --enable-tempstore=yes CFLAGS="-DSQL_HAS_CODEC" LDFLAGS="-lcrypto"
16+
cd sqlcipher && ./configure
1717
make -C sqlcipher sqlite3.c
1818

19-
# TODO include this Android.mk to integrate this into the build
20-
../obj/local/armeabi/libcrypto.so:
21-
cd openssl && ndk-build -j4
22-
mkdir -p ../obj/local/armeabi
23-
install -p openssl/libs/armeabi/libcrypto.so openssl/libs/armeabi/libssl.so \
24-
../obj/local/armeabi/
25-
2619
copy-libs-hack: build-local-hack
27-
install -p -m644 openssl/libs/armeabi/*.so ../obj/local/armeabi/
2820
install -p -m644 libs/armeabi/*.so ../obj/local/armeabi/
2921

3022
project_ldflags:= -Llibs/armeabi/ -Landroid-libs/
@@ -36,7 +28,7 @@ project_ldflags:= -Llibs/armeabi/ -Landroid-libs/
3628
# SQLITE_TEMP_STORE=3 causes all TEMP files to go into RAM. and thats the behavior we want
3729
# SQLITE_ENABLE_FTS3 enables usage of FTS3 - NOT FTS1 or 2.
3830
# SQLITE_DEFAULT_AUTOVACUUM=1 causes the databases to be subject to auto-vacuum
39-
android_sqlite_cflags := -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 -DSQLITE_THREADSAFE=1 -DNDEBUG=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_DEFAULT_AUTOVACUUM=1 -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_BACKWARDS -DSQLITE_ENABLE_LOAD_EXTENSION
31+
android_sqlite_cflags := -DHAVE_USLEEP=1 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 -DSQLITE_THREADSAFE=1 -DNDEBUG=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_DEFAULT_AUTOVACUUM=1 -DSQLITE_TEMP_STORE=3 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_BACKWARDS -DSQLITE_ENABLE_LOAD_EXTENSION -DCODEC_DEBUG
4032

4133
sqlcipher_files := \
4234
sqlcipher/sqlite3.c

0 commit comments

Comments
 (0)