Jamie Gennis | 134f042 | 2011-03-08 12:18:54 -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 | SurfaceTextureClient_test.cpp \ |
| 10 | |
| 11 | shared_libraries := \ |
| 12 | libcutils \ |
| 13 | libutils \ |
| 14 | libbinder \ |
| 15 | libgui \ |
| 16 | libstlport \ |
| 17 | |
| 18 | static_libraries := \ |
| 19 | libgtest \ |
| 20 | libgtest_main \ |
| 21 | |
| 22 | c_includes := \ |
| 23 | bionic \ |
| 24 | bionic/libstdc++/include \ |
| 25 | external/gtest/include \ |
| 26 | external/stlport/stlport \ |
| 27 | |
| 28 | module_tags := tests |
| 29 | |
| 30 | $(foreach file,$(test_src_files), \ |
| 31 | $(eval include $(CLEAR_VARS)) \ |
| 32 | $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ |
| 33 | $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \ |
| 34 | $(eval LOCAL_C_INCLUDES := $(c_includes)) \ |
| 35 | $(eval LOCAL_SRC_FILES := $(file)) \ |
| 36 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
| 37 | $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ |
| 38 | $(eval include $(BUILD_EXECUTABLE)) \ |
| 39 | ) |
| 40 | |
| 41 | # Build the manual test programs. |
| 42 | include $(call all-subdir-makefiles) |
| 43 | |
| 44 | endif |
| 45 | |
| 46 | # Include subdirectory makefiles |
| 47 | # ============================================================ |
| 48 | |
| 49 | # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework |
| 50 | # team really wants is to build the stuff defined by this makefile. |
| 51 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 52 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 53 | endif |