Android.mk revision 4f4c10104e8fbeed5dfeefb542e0bc5392daf9a5
1# Build the unit tests.
2LOCAL_PATH := $(call my-dir)
3include $(CLEAR_VARS)
4
5# Build the unit tests.
6test_src_files := \
7	BasicHashtable_test.cpp \
8	BlobCache_test.cpp \
9	Looper_test.cpp \
10	String8_test.cpp \
11	Unicode_test.cpp \
12
13shared_libraries := \
14	libz \
15	liblog \
16	libcutils \
17	libutils \
18	libstlport
19
20static_libraries := \
21	libgtest \
22	libgtest_main
23
24c_includes := \
25    external/zlib \
26    external/icu4c/common \
27    bionic \
28    bionic/libstdc++/include \
29    external/gtest/include \
30    external/stlport/stlport
31
32module_tags := eng tests
33
34$(foreach file,$(test_src_files), \
35    $(eval include $(CLEAR_VARS)) \
36    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
37    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
38    $(eval LOCAL_C_INCLUDES := $(c_includes)) \
39    $(eval LOCAL_SRC_FILES := $(file)) \
40    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
41    $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
42    $(eval include $(BUILD_EXECUTABLE)) \
43)
44