blob: e23197185c850814e2371c65251b9f845d26ec33 [file] [log] [blame]
Jeff Brown46b9ac02010-04-22 18:58:52 -07001# Build the unit tests.
Mathias Agopian6158b1b2009-05-11 00:03:41 -07002LOCAL_PATH:= $(call my-dir)
3include $(CLEAR_VARS)
4
Jeff Browneb6e0df2010-07-14 22:40:08 -07005ifneq ($(TARGET_SIMULATOR),true)
6
7# Build the unit tests.
Jeff Brown46b9ac02010-04-22 18:58:52 -07008test_src_files := \
Jeff Brown5c225b12010-06-16 01:53:36 -07009 InputChannel_test.cpp \
Jeff Brownebbd5d12011-02-17 13:01:34 -080010 InputEvent_test.cpp \
Jeff Brown5c225b12010-06-16 01:53:36 -070011 InputPublisherAndConsumer_test.cpp
Mathias Agopian6158b1b2009-05-11 00:03:41 -070012
Jeff Brownf1d38022010-06-14 15:44:41 -070013shared_libraries := \
Mathias Agopian6158b1b2009-05-11 00:03:41 -070014 libcutils \
15 libutils \
Jeff Brown46b9ac02010-04-22 18:58:52 -070016 libEGL \
17 libbinder \
18 libpixelflinger \
19 libhardware \
20 libhardware_legacy \
21 libui \
Jeff Brownebbd5d12011-02-17 13:01:34 -080022 libstlport \
23 libskia
Mathias Agopian6158b1b2009-05-11 00:03:41 -070024
Jeff Brownf1d38022010-06-14 15:44:41 -070025static_libraries := \
Jeff Brown46b9ac02010-04-22 18:58:52 -070026 libgtest \
27 libgtest_main
Mathias Agopian6158b1b2009-05-11 00:03:41 -070028
Jeff Brownf1d38022010-06-14 15:44:41 -070029c_includes := \
Jeff Brown46b9ac02010-04-22 18:58:52 -070030 bionic \
31 bionic/libstdc++/include \
32 external/gtest/include \
Jeff Brownebbd5d12011-02-17 13:01:34 -080033 external/stlport/stlport \
34 external/skia/include/core
Mathias Agopian6158b1b2009-05-11 00:03:41 -070035
Jeff Brownf1d38022010-06-14 15:44:41 -070036module_tags := eng tests
Jeff Brown46b9ac02010-04-22 18:58:52 -070037
38$(foreach file,$(test_src_files), \
Jeff Brownf1d38022010-06-14 15:44:41 -070039 $(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)) \
Jeff Brown46b9ac02010-04-22 18:58:52 -070043 $(eval LOCAL_SRC_FILES := $(file)) \
44 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brownf1d38022010-06-14 15:44:41 -070045 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Brown46b9ac02010-04-22 18:58:52 -070046 $(eval include $(BUILD_EXECUTABLE)) \
47)
48
49# Build the manual test programs.
50include $(call all-subdir-makefiles)
Jeff Browneb6e0df2010-07-14 22:40:08 -070051
52endif