Peter's keyboard firmware (QMK) https://qmk.fm/
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.

build_test.mk 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ifndef VERBOSE
  2. .SILENT:
  3. endif
  4. .DEFAULT_GOAL := all
  5. include common.mk
  6. TARGET=test/$(TEST)
  7. GTEST_OUTPUT = $(BUILD_DIR)/gtest
  8. TEST_OBJ = $(BUILD_DIR)/test_obj
  9. OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
  10. GTEST_INC := \
  11. $(LIB_PATH)/googletest/googletest/include\
  12. $(LIB_PATH)/googletest/googlemock/include\
  13. GTEST_INTERNAL_INC :=\
  14. $(LIB_PATH)/googletest/googletest\
  15. $(LIB_PATH)/googletest/googlemock
  16. $(GTEST_OUTPUT)_SRC :=\
  17. googletest/src/gtest-all.cc\
  18. googletest/src/gtest_main.cc\
  19. googlemock/src/gmock-all.cc
  20. $(GTEST_OUTPUT)_DEFS :=
  21. $(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC)
  22. LDFLAGS += -lstdc++ -lpthread -shared-libgcc
  23. CREATE_MAP := no
  24. VPATH +=\
  25. $(LIB_PATH)/googletest\
  26. $(LIB_PATH)/googlemock
  27. all: elf
  28. VPATH += $(COMMON_VPATH)
  29. PLATFORM:=TEST
  30. ifneq ($(filter $(FULL_TESTS),$(TEST)),)
  31. include tests/$(TEST)/rules.mk
  32. endif
  33. include common_features.mk
  34. include $(TMK_PATH)/common.mk
  35. include $(QUANTUM_PATH)/serial_link/tests/rules.mk
  36. ifneq ($(filter $(FULL_TESTS),$(TEST)),)
  37. include build_full_test.mk
  38. endif
  39. $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
  40. $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
  41. $(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
  42. $(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
  43. include $(TMK_PATH)/native.mk
  44. include $(TMK_PATH)/rules.mk
  45. $(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
  46. $(shell mkdir -p $(TEST_OBJ) 2>/dev/null)