Android.mk revision 3c3cc62e243a7796f5c1e88773d34e2054cc26c6
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    InputReader_test.cpp \
11    InputDispatcher_test.cpp \
12    InputPublisherAndConsumer_test.cpp
13
14shared_libraries := \
15	libcutils \
16	libutils \
17	libEGL \
18	libbinder \
19	libpixelflinger \
20	libhardware \
21	libhardware_legacy \
22	libui \
23	libstlport
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
35module_tags := eng tests
36
37$(foreach file,$(test_src_files), \
38    $(eval include $(CLEAR_VARS)) \
39    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
40    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
41    $(eval LOCAL_C_INCLUDES := $(c_includes)) \
42    $(eval LOCAL_SRC_FILES := $(file)) \
43    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
44    $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
45    $(eval include $(BUILD_EXECUTABLE)) \
46)
47
48# Build the manual test programs.
49include $(call all-subdir-makefiles)
50
51endif