1# -*- mode: makefile -*-
2
3LOCAL_PATH := $(call my-dir)
4
5sqlite_jdbc_src_files := src/main/native/sqlite_jni.c
6sqlite_jdbc_local_c_includes := external/sqlite/dist
7sqlite_cflags := -Wno-unused-parameter
8
9include $(CLEAR_VARS)
10LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java)
11LOCAL_NO_STANDARD_LIBRARIES := true
12LOCAL_JAVA_LIBRARIES := core-oj core-libart
13LOCAL_MODULE_TAGS := optional
14LOCAL_MODULE := sqlite-jdbc
15include $(BUILD_STATIC_JAVA_LIBRARY)
16
17include $(CLEAR_VARS)
18LOCAL_CFLAGS := $(sqlite_cflags)
19LOCAL_SRC_FILES := $(sqlite_jdbc_src_files)
20LOCAL_C_INCLUDES += $(sqlite_jdbc_local_c_includes)
21LOCAL_STATIC_LIBRARIES += libsqlite_static_minimal
22LOCAL_MODULE_TAGS := optional
23# This name is dictated by the fact that the SQLite code calls loadLibrary("sqlite_jni").
24LOCAL_MODULE := libsqlite_jni
25LOCAL_SDK_VERSION := 23
26include $(BUILD_SHARED_LIBRARY)
27
28ifeq ($(HOST_OS),linux)
29include $(CLEAR_VARS)
30LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java)
31LOCAL_MODULE_TAGS := optional
32LOCAL_MODULE := sqlite-jdbc-host
33include $(BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY)
34endif  # HOST_OS == linux.
35
36include $(CLEAR_VARS)
37LOCAL_CFLAGS := $(sqlite_cflags)
38LOCAL_SRC_FILES := $(sqlite_jdbc_src_files)
39LOCAL_C_INCLUDES += $(sqlite_jdbc_local_c_includes)
40LOCAL_STATIC_LIBRARIES += libsqlite_static_minimal
41LOCAL_MODULE_TAGS := optional
42LOCAL_MODULE := libsqlite_jni
43include $(BUILD_HOST_SHARED_LIBRARY)
44