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 | 59abe7e | 2010-09-13 23:17:30 -0700 | [diff] [blame] | 10 | Looper_test.cpp \ |
Kenny Root | aa96663 | 2010-08-05 16:21:23 -0700 | [diff] [blame] | 11 | String8_test.cpp |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 12 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 13 | shared_libraries := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 14 | libz \ |
| 15 | liblog \ |
| 16 | libcutils \ |
| 17 | libutils \ |
| 18 | libstlport |
| 19 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 20 | static_libraries := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 21 | libgtest \ |
| 22 | libgtest_main |
| 23 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 24 | c_includes := \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 25 | external/zlib \ |
| 26 | external/icu4c/common \ |
| 27 | bionic \ |
| 28 | bionic/libstdc++/include \ |
| 29 | external/gtest/include \ |
| 30 | external/stlport/stlport |
| 31 | |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 32 | module_tags := eng tests |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 33 | |
| 34 | $(foreach file,$(test_src_files), \ |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 35 | $(eval include $(CLEAR_VARS)) \ |
| 36 | $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \ |
| 37 | $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \ |
| 38 | $(eval LOCAL_C_INCLUDES := $(c_includes)) \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 39 | $(eval LOCAL_SRC_FILES := $(file)) \ |
| 40 | $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \ |
Jeff Brown | f69280e | 2010-06-14 15:44:41 -0700 | [diff] [blame] | 41 | $(eval LOCAL_MODULE_TAGS := $(module_tags)) \ |
Jeff Brown | e839a58 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 42 | $(eval include $(BUILD_EXECUTABLE)) \ |
| 43 | ) |
Jeff Brown | a50ee3e | 2010-07-14 22:40:08 -0700 | [diff] [blame] | 44 | |
Kenny Root | aa96663 | 2010-08-05 16:21:23 -0700 | [diff] [blame] | 45 | endif |