blob: 46d74934de319f4752eaeb4b65a9fe4452f478eb [file] [log] [blame]
Jeff Browne839a582010-04-22 18:58:52 -07001# Build the unit tests.
Mathias Agopian20f68782009-05-11 00:03:41 -07002LOCAL_PATH:= $(call my-dir)
3include $(CLEAR_VARS)
4
Jeff Browne839a582010-04-22 18:58:52 -07005test_src_files := \
Jeff Brownf4a4ec22010-06-16 01:53:36 -07006 InputChannel_test.cpp \
7 InputDispatcher_test.cpp \
8 InputPublisherAndConsumer_test.cpp
Mathias Agopian20f68782009-05-11 00:03:41 -07009
Jeff Brownf69280e2010-06-14 15:44:41 -070010shared_libraries := \
Mathias Agopian20f68782009-05-11 00:03:41 -070011 libcutils \
12 libutils \
Jeff Browne839a582010-04-22 18:58:52 -070013 libEGL \
14 libbinder \
15 libpixelflinger \
16 libhardware \
17 libhardware_legacy \
18 libui \
19 libstlport
Mathias Agopian20f68782009-05-11 00:03:41 -070020
Jeff Brownf69280e2010-06-14 15:44:41 -070021static_libraries := \
Jeff Browne839a582010-04-22 18:58:52 -070022 libgtest \
23 libgtest_main
Mathias Agopian20f68782009-05-11 00:03:41 -070024
Jeff Brownf69280e2010-06-14 15:44:41 -070025c_includes := \
Jeff Browne839a582010-04-22 18:58:52 -070026 bionic \
27 bionic/libstdc++/include \
28 external/gtest/include \
29 external/stlport/stlport
Mathias Agopian20f68782009-05-11 00:03:41 -070030
Jeff Brownf69280e2010-06-14 15:44:41 -070031module_tags := eng tests
Jeff Browne839a582010-04-22 18:58:52 -070032
33$(foreach file,$(test_src_files), \
Jeff Brownf69280e2010-06-14 15:44:41 -070034 $(eval include $(CLEAR_VARS)) \
35 $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
36 $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
37 $(eval LOCAL_C_INCLUDES := $(c_includes)) \
Jeff Browne839a582010-04-22 18:58:52 -070038 $(eval LOCAL_SRC_FILES := $(file)) \
39 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brownf69280e2010-06-14 15:44:41 -070040 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Browne839a582010-04-22 18:58:52 -070041 $(eval include $(BUILD_EXECUTABLE)) \
42)
43
44# Build the manual test programs.
45include $(call all-subdir-makefiles)