Android.mk revision db8a386d111b11463c877b3a14ab62aec761a3f5
1LOCAL_PATH:= $(call my-dir)
2
3libsqlite3_android_local_src_files := \
4	PhoneNumberUtils.cpp \
5	OldPhoneNumberUtils.cpp \
6	PhonebookIndex.cpp \
7	sqlite3_android.cpp
8
9libsqlite3_android_c_includes := \
10        external/sqlite/dist \
11        external/icu4c/i18n \
12        external/icu4c/common \
13        frameworks/native/include
14
15include $(CLEAR_VARS)
16LOCAL_SRC_FILES:= $(libsqlite3_android_local_src_files)
17LOCAL_C_INCLUDES := $(libsqlite3_android_c_includes)
18LOCAL_MODULE:= libsqlite3_android
19include $(BUILD_STATIC_LIBRARY)
20
21ifeq ($(WITH_HOST_DALVIK),true)
22    include $(CLEAR_VARS)
23    LOCAL_SRC_FILES:= $(libsqlite3_android_local_src_files)
24    LOCAL_C_INCLUDES := $(libsqlite3_android_c_includes)
25    LOCAL_MODULE:= libsqlite3_android
26    include $(BUILD_HOST_STATIC_LIBRARY)
27endif
28
29# Test for PhoneNumberUtils
30#
31# You can also test this in Unix, like this:
32# > g++ -Wall external/sqlite/android/PhoneNumberUtils.cpp \
33#   external/sqlite/android/PhoneNumberUtilsTest.cpp
34# > ./a.out
35#
36# Note: This "test" is not recognized as a formal test. This is just for enabling developers
37#       to easily check what they modified works well or not.
38#       The formal test for phone_number_compare() is in DataBaseGeneralTest.java
39#       (as of 2009-08-02), in which phone_number_compare() is tested via sqlite's custom
40#       function "PHONE_NUMBER_COMPARE".
41#       Please add tests if you modify the implementation of PhoneNumberUtils.cpp and add
42#       test cases in PhoneNumberUtilsTest.cpp.
43include $(CLEAR_VARS)
44
45LOCAL_MODULE:= libsqlite3_phone_number_utils_test
46
47LOCAL_CFLAGS += -Wall -Werror
48
49LOCAL_SRC_FILES := \
50	PhoneNumberUtils.cpp \
51	PhoneNumberUtilsTest.cpp
52
53LOCAL_MODULE_TAGS := optional
54
55include $(BUILD_EXECUTABLE)
56
57ifeq ($(WITH_HOST_DALVIK),true)
58  include $(CLEAR_VARS)
59
60  LOCAL_MODULE:= libsqlite3_phone_book_index_test
61
62  LOCAL_SRC_FILES := \
63	PhonebookIndex.cpp \
64	PhonebookIndexTest.cpp
65
66  LOCAL_C_INCLUDES := \
67        external/icu4c/i18n \
68        external/icu4c/common \
69        frameworks/native/include
70
71  LOCAL_MODULE_TAGS := optional
72
73  LOCAL_SHARED_LIBRARIES := \
74	libicui18n libicuuc
75
76  LOCAL_STATIC_LIBRARIES := \
77	libutils libcutils
78
79  include $(BUILD_HOST_EXECUTABLE)
80endif
81