From 72516aafa8b775c236cf50f7dce66cf6c92470e9 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 16 Nov 2020 23:15:13 -0800 Subject: [PATCH] I think this will fix building simulator tests? --- etc/makefiles/arduino-cli.mk | 3 +-- testing/makefiles/testcase.mk | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/etc/makefiles/arduino-cli.mk b/etc/makefiles/arduino-cli.mk index 1a089708..45c662bb 100644 --- a/etc/makefiles/arduino-cli.mk +++ b/etc/makefiles/arduino-cli.mk @@ -1,5 +1,4 @@ -mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) -mkfile_dir := $(dir $(mkfile_path)) +mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) KALEIDOSCOPE_DIR ?= $(abspath $(mkfile_dir)/../..) KALEIDOSCOPE_BIN_DIR ?= $(KALEIDOSCOPE_DIR)/bin diff --git a/testing/makefiles/testcase.mk b/testing/makefiles/testcase.mk index e2889ebc..5e8a426f 100644 --- a/testing/makefiles/testcase.mk +++ b/testing/makefiles/testcase.mk @@ -1,15 +1,18 @@ top_dir := $(dir $(lastword ${MAKEFILE_LIST}))../.. -include $(top_dir)/etc/makefiles/arduino-cli.mk build_dir := ${top_dir}/_build/${testcase} + LIB_DIR := ${build_dir}/lib OBJ_DIR := ${build_dir}/obj BIN_DIR := ${build_dir}/bin COMMON_LIB_DIR := ${top_dir}/_build/lib +include $(top_dir)/etc/makefiles/arduino-cli.mk + + SRC_DIR := test SKETCH_FILE=$(wildcard *.ino) @@ -29,6 +32,7 @@ TEST_FILES += $(SRC_DIR)/generated-testcase.cpp endif endif +.DEFAULT_GOAL := build TEST_OBJS=$(patsubst $(SRC_DIR)/%.cpp,${OBJ_DIR}/%.o,$(TEST_FILES))