Android.mk revision b2d4435dfa44531ee6025563571cfd77cd1b4f97
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    InputChannel_test.cpp \
10    InputEvent_test.cpp \
11    InputPublisherAndConsumer_test.cpp
12
13shared_libraries := \
14	libcutils \
15	libutils \
16	libEGL \
17	libbinder \
18	libpixelflinger \
19	libhardware \
20	libhardware_legacy \
21	libui \
22	libstlport \
23	libskia
24
25static_libraries := \
26	libgtest \
27	libgtest_main
28
29c_includes := \
30    bionic \
31    bionic/libstdc++/include \
32    external/gtest/include \
33    external/stlport/stlport \
34    external/skia/include/core
35
36module_tags := eng tests
37
38$(foreach file,$(test_src_files), \
39    $(eval include $(CLEAR_VARS)) \
40    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
41    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
42    $(eval LOCAL_C_INCLUDES := $(c_includes)) \
43    $(eval LOCAL_SRC_FILES := $(file)) \
44    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
45    $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
46    $(eval include $(BUILD_EXECUTABLE)) \
47)
48
49# Build the manual test programs.
50include $(call all-subdir-makefiles)
51
52endif