1 # 2 # CHRE GoogleTest Build Variant 3 # 4 5 include $(CHRE_PREFIX)/build/clean_build_template_args.mk 6 7 TARGET_NAME = google_x86_googletest 8 TARGET_CFLAGS = -DCHRE_MESSAGE_TO_HOST_MAX_SIZE=2048 9 TARGET_VARIANT_SRCS = $(GOOGLE_X86_GOOGLETEST_SRCS) 10 TARGET_VARIANT_SRCS += $(GOOGLETEST_SRCS) 11 12 # Add a symbol to determine when building for a test. 13 TARGET_CFLAGS += -DGTEST 14 15 # Ignore sign comparison warnings triggered by EXPECT/ASSERT macros in tests 16 # (typically, unsigned value vs. implicitly signed literal) 17 TARGET_CFLAGS += -Wno-sign-compare 18 19 TARGET_SO_LATE_LIBS = $(GOOGLE_X86_GOOGLETEST_LATE_LIBS) 20 21 ifneq ($(filter $(TARGET_NAME)% all, $(MAKECMDGOALS)),) 22 23 ifeq ($(ANDROID_BUILD_TOP),) 24 $(error "You should supply an ANDROID_BUILD_TOP environment variable \ 25 containing a path to the Android source tree. This is typically \ 26 provided by initializing the Android build environment.") 27 endif 28 export GOOGLETEST_PREFIX=$(ANDROID_BUILD_TOP)/external/googletest 29 include $(CHRE_PREFIX)/build/arch/x86.mk 30 31 TARGET_CFLAGS += $(GOOGLETEST_CFLAGS) 32 TARGET_CFLAGS += $(GOOGLE_X86_GOOGLETEST_CFLAGS) 33 34 # Instruct the build to link a final executable. 35 TARGET_BUILD_BIN = true 36 37 # Link in libraries for the final executable. 38 TARGET_BIN_LDFLAGS += -lrt -ldl 39 TARGET_BIN_LDFLAGS += -lpthread 40 41 include $(CHRE_PREFIX)/build/build_template.mk 42 endif 43