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