blob: 212b8e75919aac659511d16612a0b604c759c166 [file] [log] [blame]
Jamie Gennisd2acedf2011-03-08 12:18:54 -08001# Build the unit tests.
2LOCAL_PATH:= $(call my-dir)
3include $(CLEAR_VARS)
4
5ifneq ($(TARGET_SIMULATOR),true)
6
7# Build the unit tests.
8test_src_files := \
9 Surface_test.cpp \
10
11shared_libraries := \
12 libcutils \
13 libutils \
14 libbinder \
15 libsurfaceflinger_client \
16 libstlport \
17
18static_libraries := \
19 libgtest \
20 libgtest_main \
21
22c_includes := \
23 bionic \
24 bionic/libstdc++/include \
25 external/gtest/include \
26 external/stlport/stlport \
27
28module_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.
Mathias Agopianbfe7f0b12010-04-27 21:08:20 -070042include $(call all-subdir-makefiles)
Jamie Gennisd2acedf2011-03-08 12:18:54 -080043
44endif
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.
51ifeq (,$(ONE_SHOT_MAKEFILE))
52include $(call first-makefiles-under,$(LOCAL_PATH))
53endif