Android.mk revision 66fbde305047b7a606d083a9ec8994fa693cc7d7
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	ObbFile_test.cpp \
11	String8_test.cpp \
12	Unicode_test.cpp \
13	ZipFileRO_test.cpp \
14
15shared_libraries := \
16	libz \
17	liblog \
18	libcutils \
19	libutils \
20	libstlport
21
22static_libraries := \
23	libgtest \
24	libgtest_main
25
26c_includes := \
27    external/zlib \
28    external/icu4c/common \
29    bionic \
30    bionic/libstdc++/include \
31    external/gtest/include \
32    external/stlport/stlport
33
34module_tags := eng tests
35
36$(foreach file,$(test_src_files), \
37    $(eval include $(CLEAR_VARS)) \
38    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
39    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
40    $(eval LOCAL_C_INCLUDES := $(c_includes)) \
41    $(eval LOCAL_SRC_FILES := $(file)) \
42    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
43    $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
44    $(eval include $(BUILD_EXECUTABLE)) \
45)
46