2016-08-22 09:16:08 +03:00
|
|
|
ifndef VERBOSE
|
|
|
|
.SILENT:
|
|
|
|
endif
|
|
|
|
|
|
|
|
.DEFAULT_GOAL := all
|
|
|
|
|
2016-08-21 17:14:38 +03:00
|
|
|
include common.mk
|
|
|
|
|
2016-08-22 09:16:08 +03:00
|
|
|
TARGET=test/$(TEST)
|
|
|
|
|
|
|
|
GTEST_OUTPUT = $(BUILD_DIR)/gtest
|
|
|
|
|
2016-08-24 22:23:17 +03:00
|
|
|
TEST_OBJ = $(BUILD_DIR)/test_obj
|
|
|
|
|
|
|
|
OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
|
2016-08-22 09:16:08 +03:00
|
|
|
|
|
|
|
GTEST_INC := \
|
|
|
|
$(LIB_PATH)/googletest/googletest/include\
|
|
|
|
$(LIB_PATH)/googletest/googlemock/include\
|
|
|
|
|
|
|
|
GTEST_INTERNAL_INC :=\
|
|
|
|
$(LIB_PATH)/googletest/googletest\
|
|
|
|
$(LIB_PATH)/googletest/googlemock
|
|
|
|
|
|
|
|
$(GTEST_OUTPUT)_SRC :=\
|
|
|
|
googletest/src/gtest-all.cc\
|
|
|
|
googletest/src/gtest_main.cc\
|
|
|
|
googlemock/src/gmock-all.cc
|
|
|
|
|
|
|
|
$(GTEST_OUTPUT)_DEFS :=
|
|
|
|
$(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC)
|
|
|
|
|
|
|
|
LDFLAGS += -lstdc++ -lpthread -shared-libgcc
|
2016-08-27 17:43:35 +03:00
|
|
|
CREATE_MAP := no
|
2016-08-22 09:16:08 +03:00
|
|
|
|
|
|
|
VPATH +=\
|
|
|
|
$(LIB_PATH)/googletest\
|
|
|
|
$(LIB_PATH)/googlemock
|
|
|
|
|
|
|
|
all: elf
|
|
|
|
|
2016-08-27 13:43:12 +03:00
|
|
|
VPATH += $(COMMON_VPATH)
|
2017-06-16 22:01:21 +03:00
|
|
|
PLATFORM:=TEST
|
2016-08-27 13:43:12 +03:00
|
|
|
|
2017-06-16 22:14:47 +03:00
|
|
|
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
|
|
|
include tests/$(TEST)/rules.mk
|
|
|
|
endif
|
|
|
|
|
|
|
|
include common_features.mk
|
2016-08-27 13:43:12 +03:00
|
|
|
include $(TMK_PATH)/common.mk
|
2016-08-24 22:23:17 +03:00
|
|
|
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
2017-06-16 20:21:28 +03:00
|
|
|
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
|
|
|
include build_full_test.mk
|
|
|
|
endif
|
2016-08-24 22:23:17 +03:00
|
|
|
|
|
|
|
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
|
|
|
|
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
|
|
|
|
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
|
2017-06-16 21:38:34 +03:00
|
|
|
$(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
|
2016-08-24 22:23:17 +03:00
|
|
|
|
2016-08-22 09:16:08 +03:00
|
|
|
include $(TMK_PATH)/native.mk
|
|
|
|
include $(TMK_PATH)/rules.mk
|
|
|
|
|
2016-08-24 22:23:17 +03:00
|
|
|
|
|
|
|
$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
|
|
|
|
$(shell mkdir -p $(TEST_OBJ) 2>/dev/null)
|
2016-08-21 17:14:38 +03:00
|
|
|
|