diff options
author | Narayan Kamath <narayan@google.com> | 2016-01-11 11:39:15 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-01-11 11:39:15 +0000 |
commit | 382b7beebed97d38f55c7703b1af879c5c323d7c (patch) | |
tree | 9466d065d17932b6cd378246b44b1446545fd2ca | |
parent | 6dc83a58ba61b2a20ad4f228ceb1af7fcd0a47f6 (diff) | |
parent | f63e8d96e298783c310c08030d4c51a875dae4cd (diff) |
Merge "Add a build rule for a minimal static library version of sqlite3."
-rw-r--r-- | dist/Android.mk | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/dist/Android.mk b/dist/Android.mk index 44a3173..bf277d2 100644 --- a/dist/Android.mk +++ b/dist/Android.mk @@ -10,7 +10,7 @@ LOCAL_PATH:= $(call my-dir) # SQLITE_TEMP_STORE=3 causes all TEMP files to go into RAM. and thats the behavior we want # SQLITE_ENABLE_FTS3 enables usage of FTS3 - NOT FTS1 or 2. # SQLITE_DEFAULT_AUTOVACUUM=1 causes the databases to be subject to auto-vacuum -common_sqlite_flags := \ +minimal_sqlite_flags := \ -DNDEBUG=1 \ -DHAVE_USLEEP=1 \ -DSQLITE_HAVE_ISNAN \ @@ -29,15 +29,13 @@ common_sqlite_flags := \ -DSQLITE_OMIT_LOAD_EXTENSION \ -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 -device_sqlite_flags := $(common_sqlite_flags) \ +device_sqlite_flags := $(minimal_sqlite_flags) \ -DSQLITE_ENABLE_ICU \ -DUSE_PREAD64 \ -Dfdatasync=fdatasync \ -DHAVE_MALLOC_H=1 \ -DHAVE_MALLOC_USABLE_SIZE -host_sqlite_flags := $(common_sqlite_flags) - common_src_files := sqlite3.c # the device library @@ -68,7 +66,7 @@ include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) LOCAL_LDLIBS += -lpthread -ldl -LOCAL_CFLAGS += $(host_sqlite_flags) +LOCAL_CFLAGS += $(minimal_sqlite_flags) LOCAL_MODULE:= libsqlite LOCAL_SHARED_LIBRARIES += libicuuc-host libicui18n-host LOCAL_STATIC_LIBRARIES := liblog libutils libcutils @@ -122,7 +120,7 @@ endif # !SDK_ONLY include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) shell.c -LOCAL_CFLAGS += $(host_sqlite_flags) \ +LOCAL_CFLAGS += $(minimal_sqlite_flags) \ -DNO_ANDROID_FUNCS=1 # sqlite3MemsysAlarm uses LOG() @@ -136,3 +134,20 @@ LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_MODULE := sqlite3 include $(BUILD_HOST_EXECUTABLE) + +# Build a minimal version of sqlite3 without any android specific +# features against the NDK. This is used by libcore's JDBC related +# unit tests. +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(common_src_files) +LOCAL_CFLAGS += $(minimal_sqlite_flags) +LOCAL_MODULE:= libsqlite_static_minimal +LOCAL_SDK_VERSION := 23 +include $(BUILD_STATIC_LIBRARY) + +# Same as libsqlite_static_minimal, except that this is for the host. +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(common_src_files) +LOCAL_CFLAGS += $(minimal_sqlite_flags) +LOCAL_MODULE:= libsqlite_static_minimal +include $(BUILD_HOST_STATIC_LIBRARY) |