Android.mk revision aa966638b9428e78837eff93ef29f10f31193256
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	PollLoop_test.cpp \
11	String8_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
45endif
46