blob: 1ff896baf779a32c02a144d79fb8b5593bb3fd4b [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 Brown46b9ac02010-04-22 18:58:52 -07005test_src_files := \
6 InputDispatcher_test.cpp
Mathias Agopian6158b1b2009-05-11 00:03:41 -07007
Jeff Brownf1d38022010-06-14 15:44:41 -07008shared_libraries := \
Mathias Agopian6158b1b2009-05-11 00:03:41 -07009 libcutils \
10 libutils \
Jeff Brown46b9ac02010-04-22 18:58:52 -070011 libEGL \
12 libbinder \
13 libpixelflinger \
14 libhardware \
15 libhardware_legacy \
16 libui \
17 libstlport
Mathias Agopian6158b1b2009-05-11 00:03:41 -070018
Jeff Brownf1d38022010-06-14 15:44:41 -070019static_libraries := \
Jeff Brown46b9ac02010-04-22 18:58:52 -070020 libgtest \
21 libgtest_main
Mathias Agopian6158b1b2009-05-11 00:03:41 -070022
Jeff Brownf1d38022010-06-14 15:44:41 -070023c_includes := \
Jeff Brown46b9ac02010-04-22 18:58:52 -070024 bionic \
25 bionic/libstdc++/include \
26 external/gtest/include \
27 external/stlport/stlport
Mathias Agopian6158b1b2009-05-11 00:03:41 -070028
Jeff Brownf1d38022010-06-14 15:44:41 -070029module_tags := eng tests
Jeff Brown46b9ac02010-04-22 18:58:52 -070030
31$(foreach file,$(test_src_files), \
Jeff Brownf1d38022010-06-14 15:44:41 -070032 $(eval include $(CLEAR_VARS)) \
33 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
34 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
35 $(eval LOCAL_C_INCLUDES := $(c_includes)) \
Jeff Brown46b9ac02010-04-22 18:58:52 -070036 $(eval LOCAL_SRC_FILES := $(file)) \
37 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brownf1d38022010-06-14 15:44:41 -070038 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Brown46b9ac02010-04-22 18:58:52 -070039 $(eval include $(BUILD_EXECUTABLE)) \
40)
41
42# Build the manual test programs.
43include $(call all-subdir-makefiles)