Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 1 | # Build the unit tests. |
Mathias Agopian | 6158b1b | 2009-05-11 00:03:41 -0700 | [diff] [blame] | 2 | LOCAL_PATH:= $(call my-dir) |
| 3 | include $(CLEAR_VARS) |
| 4 | |
Jeff Brown | eb6e0df | 2010-07-14 22:40:08 -0700 | [diff] [blame] | 5 | ifneq ($(TARGET_SIMULATOR),true) |
| 6 | |
| 7 | # Build the unit tests. |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 8 | test_src_files := \ |
Jeff Brown | 5c225b1 | 2010-06-16 01:53:36 -0700 | [diff] [blame] | 9 | InputChannel_test.cpp \ |
Jeff Brown | ebbd5d1 | 2011-02-17 13:01:34 -0800 | [diff] [blame] | 10 | InputEvent_test.cpp \ |
Jeff Brown | 5c225b1 | 2010-06-16 01:53:36 -0700 | [diff] [blame] | 11 | InputPublisherAndConsumer_test.cpp |
Mathias Agopian | 6158b1b | 2009-05-11 00:03:41 -0700 | [diff] [blame] | 12 | |
Jeff Brown | f1d3802 | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 13 | shared_libraries := \ |
Mathias Agopian | 6158b1b | 2009-05-11 00:03:41 -0700 | [diff] [blame] | 14 | libcutils \ |
| 15 | libutils \ |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 16 | libEGL \ |
| 17 | libbinder \ |
| 18 | libpixelflinger \ |
| 19 | libhardware \ |
| 20 | libhardware_legacy \ |
| 21 | libui \ |
Jeff Brown | ebbd5d1 | 2011-02-17 13:01:34 -0800 | [diff] [blame] | 22 | libstlport \ |
| 23 | libskia |
Mathias Agopian | 6158b1b | 2009-05-11 00:03:41 -0700 | [diff] [blame] | 24 | |
Jeff Brown | f1d3802 | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 25 | static_libraries := \ |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 26 | libgtest \ |
| 27 | libgtest_main |
Mathias Agopian | 6158b1b | 2009-05-11 00:03:41 -0700 | [diff] [blame] | 28 | |
Jeff Brown | f1d3802 | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 29 | c_includes := \ |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 30 | bionic \ |
| 31 | bionic/libstdc++/include \ |
| 32 | external/gtest/include \ |
Jeff Brown | ebbd5d1 | 2011-02-17 13:01:34 -0800 | [diff] [blame] | 33 | external/stlport/stlport \ |
| 34 | external/skia/include/core |
Mathias Agopian | 6158b1b | 2009-05-11 00:03:41 -0700 | [diff] [blame] | 35 | |
Jeff Brown | f1d3802 | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 36 | module_tags := eng tests |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 37 | |
| 38 | $(foreach file,$(test_src_files), \ |
Jeff Brown | f1d3802 | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 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)) \ |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 43 | $(eval LOCAL_SRC_FILES := $(file)) \ |
| 44 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
Jeff Brown | f1d3802 | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 45 | $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 46 | $(eval include $(BUILD_EXECUTABLE)) \ |
| 47 | ) |
| 48 | |
| 49 | # Build the manual test programs. |
| 50 | include $(call all-subdir-makefiles) |
Jeff Brown | eb6e0df | 2010-07-14 22:40:08 -0700 | [diff] [blame] | 51 | |
| 52 | endif |