forked from android-rooting-tools/android_libsqlite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
63 lines (51 loc) · 1.46 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
##
##
## Build the library
##
##
LOCAL_PATH:= $(call my-dir)
# NOTE the following flags,
# 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 := \
-DNDEBUG=1 \
-DHAVE_USLEEP=1 \
-DSQLITE_HAVE_ISNAN \
-DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 \
-DSQLITE_THREADSAFE=2 \
-DSQLITE_TEMP_STORE=3 \
-DSQLITE_POWERSAFE_OVERWRITE=1 \
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
-DSQLITE_DEFAULT_AUTOVACUUM=1 \
-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 \
-DSQLITE_ENABLE_FTS3 \
-DSQLITE_ENABLE_FTS3_BACKWARDS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_OMIT_BUILTIN_TEST \
-DSQLITE_OMIT_COMPILEOPTION_DIAGS \
-DSQLITE_OMIT_LOAD_EXTENSION \
-DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 \
common_src_files := dist/sqlite3.c
ifeq ($(WITH_QC_PERF),true)
common_sqlite_flags += -DQC_PERF
endif
# the device library
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(common_src_files)
ifneq ($(TARGET_ARCH),arm)
LOCAL_LDLIBS += -lpthread -ldl
endif
LOCAL_CFLAGS += $(common_sqlite_flags)
LOCAL_SHARED_LIBRARIES := libdl
LOCAL_MODULE:= libsqlite
LOCAL_SHARED_LIBRARIES += liblog \
libicuuc \
libicui18n \
libutils \
liblog
ifeq ($(WITH_QC_PERF),true)
LOCAL_WHOLE_STATIC_LIBRARIES += libqc-sqlite
LOCAL_STATIC_LIBRARIES += libcutils
endif
include $(BUILD_STATIC_LIBRARY)