1########################################################### 2########################################################### 3### 4### GTest libraries. 5### 6### GoogleTest is used to build the emulator's Android-specific 7### unit tests. The sources are located under 8### $ANDROID/extern/gtest but because we need to build both 9### 32-bit and 64-bit host libraries, don't reuse the 10### Android.mk there, define a module here instead. 11 12EMULATOR_GTEST_SOURCES_DIR ?= $(LOCAL_PATH)/../gtest 13EMULATOR_GTEST_SOURCES_DIR := $(EMULATOR_GTEST_SOURCES_DIR) 14ifeq (,$(strip $(wildcard $(EMULATOR_GTEST_SOURCES_DIR)))) 15 $(error Cannot find GoogleTest sources directory: $(EMULATOR_GTEST_SOURCES_DIR)) 16endif 17 18EMULATOR_GTEST_INCLUDES := $(EMULATOR_GTEST_SOURCES_DIR)/include 19EMULATOR_GTEST_SOURCES := src/gtest-all.cc src/gtest_main.cc 20EMULATOR_GTEST_LDLIBS := -lstdc++ 21 22old_LOCAL_PATH := $(LOCAL_PATH) 23 24LOCAL_PATH := $(EMULATOR_GTEST_SOURCES_DIR) 25 26$(call start-emulator-library, emulator-libgtest) 27LOCAL_C_INCLUDES += $(EMULATOR_GTEST_INCLUDES) 28LOCAL_CPP_EXTENSION := .cc 29LOCAL_CFLAGS += -O0 30LOCAL_SRC_FILES := $(EMULATOR_GTEST_SOURCES) 31$(call end-emulator-library) 32 33$(call start-emulator64-library, emulator64-libgtest) 34LOCAL_C_INCLUDES += $(EMULATOR_GTEST_INCLUDES) 35LOCAL_CPP_EXTENSION := .cc 36LOCAL_CFLAGS += -O0 37LOCAL_SRC_FILES := $(EMULATOR_GTEST_SOURCES) 38$(call end-emulator-library) 39 40LOCAL_PATH := $(old_LOCAL_PATH) 41 42