You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
42 lines
1.3 KiB
# |
|
# CHRE GoogleTest Build Variant |
|
# |
|
|
|
include $(CHRE_PREFIX)/build/clean_build_template_args.mk |
|
|
|
TARGET_NAME = google_x86_googletest |
|
TARGET_CFLAGS = -DCHRE_MESSAGE_TO_HOST_MAX_SIZE=2048 |
|
TARGET_VARIANT_SRCS = $(GOOGLE_X86_GOOGLETEST_SRCS) |
|
TARGET_VARIANT_SRCS += $(GOOGLETEST_SRCS) |
|
|
|
# Add a symbol to determine when building for a test. |
|
TARGET_CFLAGS += -DGTEST |
|
|
|
# Ignore sign comparison warnings triggered by EXPECT/ASSERT macros in tests |
|
# (typically, unsigned value vs. implicitly signed literal) |
|
TARGET_CFLAGS += -Wno-sign-compare |
|
|
|
TARGET_SO_LATE_LIBS = $(GOOGLE_X86_GOOGLETEST_LATE_LIBS) |
|
|
|
ifneq ($(filter $(TARGET_NAME)% all, $(MAKECMDGOALS)),) |
|
|
|
ifeq ($(ANDROID_BUILD_TOP),) |
|
$(error "You should supply an ANDROID_BUILD_TOP environment variable \ |
|
containing a path to the Android source tree. This is typically \ |
|
provided by initializing the Android build environment.") |
|
endif |
|
export GOOGLETEST_PREFIX=$(ANDROID_BUILD_TOP)/external/googletest |
|
include $(CHRE_PREFIX)/build/arch/x86.mk |
|
|
|
TARGET_CFLAGS += $(GOOGLETEST_CFLAGS) |
|
TARGET_CFLAGS += $(GOOGLE_X86_GOOGLETEST_CFLAGS) |
|
|
|
# Instruct the build to link a final executable. |
|
TARGET_BUILD_BIN = true |
|
|
|
# Link in libraries for the final executable. |
|
TARGET_BIN_LDFLAGS += -lrt -ldl |
|
TARGET_BIN_LDFLAGS += -lpthread |
|
|
|
include $(CHRE_PREFIX)/build/build_template.mk |
|
endif
|
|
|