Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 1 | # Build the unit tests. |
| 2 | LOCAL_PATH := $(call my-dir) |
| 3 | include $(CLEAR_VARS) |
| 4 | |
Jeff Brown | a50ee3e | 2010-07-14 22:40:08 -0700 | [diff] [blame^] | 5 | ifneq ($(TARGET_SIMULATOR),true) |
| 6 | |
| 7 | # Build the unit tests. |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 8 | test_src_files := \ |
Kenny Root | b94a9a6 | 2010-06-01 10:34:29 -0700 | [diff] [blame] | 9 | ObbFile_test.cpp \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 10 | PollLoop_test.cpp |
| 11 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 12 | shared_libraries := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 13 | libz \ |
| 14 | liblog \ |
| 15 | libcutils \ |
| 16 | libutils \ |
| 17 | libstlport |
| 18 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 19 | static_libraries := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 20 | libgtest \ |
| 21 | libgtest_main |
| 22 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 23 | c_includes := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 24 | external/zlib \ |
| 25 | external/icu4c/common \ |
| 26 | bionic \ |
| 27 | bionic/libstdc++/include \ |
| 28 | external/gtest/include \ |
| 29 | external/stlport/stlport |
| 30 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 31 | module_tags := eng tests |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 32 | |
| 33 | $(foreach file,$(test_src_files), \ |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 34 | $(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 Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 38 | $(eval LOCAL_SRC_FILES := $(file)) \ |
| 39 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 40 | $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 41 | $(eval include $(BUILD_EXECUTABLE)) \ |
| 42 | ) |
Jeff Brown | a50ee3e | 2010-07-14 22:40:08 -0700 | [diff] [blame^] | 43 | |
| 44 | endif |