Jeff Brown | b4ff35d | 2011-01-02 16:37:43 -0800 | [diff] [blame] | 1 | # Build the unit tests. |
| 2 | LOCAL_PATH:= $(call my-dir) |
| 3 | include $(CLEAR_VARS) |
| 4 | |
| 5 | ifneq ($(TARGET_SIMULATOR),true) |
| 6 | |
| 7 | # Build the unit tests. |
| 8 | test_src_files := \ |
| 9 | InputReader_test.cpp \ |
| 10 | InputDispatcher_test.cpp |
| 11 | |
| 12 | shared_libraries := \ |
| 13 | libcutils \ |
| 14 | libutils \ |
| 15 | libhardware \ |
| 16 | libhardware_legacy \ |
| 17 | libui \ |
| 18 | libsurfaceflinger_client \ |
| 19 | libskia \ |
| 20 | libstlport \ |
| 21 | libinput |
| 22 | |
| 23 | static_libraries := \ |
| 24 | libgtest \ |
| 25 | libgtest_main |
| 26 | |
| 27 | c_includes := \ |
| 28 | bionic \ |
| 29 | bionic/libstdc++/include \ |
| 30 | external/gtest/include \ |
| 31 | external/stlport/stlport \ |
| 32 | external/skia/include/core |
| 33 | |
| 34 | module_tags := eng tests |
| 35 | |
| 36 | $(foreach file,$(test_src_files), \ |
| 37 | $(eval include $(CLEAR_VARS)) \ |
| 38 | $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ |
| 39 | $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \ |
| 40 | $(eval LOCAL_C_INCLUDES := $(c_includes)) \ |
| 41 | $(eval LOCAL_SRC_FILES := $(file)) \ |
| 42 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
| 43 | $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ |
| 44 | $(eval include $(BUILD_EXECUTABLE)) \ |
| 45 | ) |
| 46 | |
| 47 | # Build the manual test programs. |
| 48 | include $(call all-subdir-makefiles) |
| 49 | |
| 50 | endif |