blob: b9f206a9d89f4e304af43070ec90f8243cf33774 [file] [log] [blame]
Jeff Brown66db6892010-04-22 18:58:52 -07001# Build the unit tests.
2LOCAL_PATH := $(call my-dir)
3include $(CLEAR_VARS)
4
Jeff Brown3f607c12010-07-14 22:40:08 -07005ifneq ($(TARGET_SIMULATOR),true)
6
7# Build the unit tests.
Jeff Brown66db6892010-04-22 18:58:52 -07008test_src_files := \
Kenny Root1d2aeb62010-06-01 10:34:29 -07009 ObbFile_test.cpp \
Jeff Brown66db6892010-04-22 18:58:52 -070010 PollLoop_test.cpp
11
Jeff Brown80d9c1c2010-06-14 15:44:41 -070012shared_libraries := \
Jeff Brown66db6892010-04-22 18:58:52 -070013 libz \
14 liblog \
15 libcutils \
16 libutils \
17 libstlport
18
Jeff Brown80d9c1c2010-06-14 15:44:41 -070019static_libraries := \
Jeff Brown66db6892010-04-22 18:58:52 -070020 libgtest \
21 libgtest_main
22
Jeff Brown80d9c1c2010-06-14 15:44:41 -070023c_includes := \
Jeff Brown66db6892010-04-22 18:58:52 -070024 external/zlib \
25 external/icu4c/common \
26 bionic \
27 bionic/libstdc++/include \
28 external/gtest/include \
29 external/stlport/stlport
30
Jeff Brown80d9c1c2010-06-14 15:44:41 -070031module_tags := eng tests
Jeff Brown66db6892010-04-22 18:58:52 -070032
33$(foreach file,$(test_src_files), \
Jeff Brown80d9c1c2010-06-14 15:44:41 -070034 $(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 Brown66db6892010-04-22 18:58:52 -070038 $(eval LOCAL_SRC_FILES := $(file)) \
39 $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
Jeff Brown80d9c1c2010-06-14 15:44:41 -070040 $(eval LOCAL_MODULE_TAGS := $(module_tags)) \
Jeff Brown66db6892010-04-22 18:58:52 -070041 $(eval include $(BUILD_EXECUTABLE)) \
42)
Jeff Brown3f607c12010-07-14 22:40:08 -070043
44endif