summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2016-07-08 12:42:45 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-11 21:27:46 -0700
commitafa53e3950abd4727eab9b14275b4805495767b7 (patch)
treea73c70b60b7d16a570a9324c88ca90d159c6e95c /Makefile
parent9a710bd340f12db0334e08bc46cb2228f42ff956 (diff)
downloadchrome-ec-afa53e3950abd4727eab9b14275b4805495767b7.tar.gz
Add cts.tasklist
cts.tasklist contains tasks run only for CTS. These tasks are added to the tasks registered in ec.tasklist with higher priority. This design allows board directories to be free from CTS stuff. cts.tasklist can be placed in each suite directory (cts/suite/cts.tasklist). If a suite does not define its own cts.tasklist, the common list is used (i.e. cts/cts.tasklist). BUG=chromium:624520 BRANCH=none TEST=Ran the followings: make buildall make CTS_MODULE=gpio BOARD=nucleo-f072rb make CTS_MODULE=gpio BOARD=stm32l476g-eval Change-Id: Ibb242297ee10a397a8fcb6ff73d8cbc560daa885 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/359445 Reviewed-by: Chris Chen <twothreecc@google.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index ac296ad6dd..3b5c4e70d4 100644
--- a/Makefile
+++ b/Makefile
@@ -58,6 +58,9 @@ UC_PROJECT:=$(call uppercase,$(PROJECT))
# the board/project/chip/core variables are defined, since some of the configs
# are dependent on particular configurations.
includes=include core/$(CORE)/include $(dirs) $(out) test
+ifdef CTS_MODULE
+includes+=cts/$(CTS_MODULE) cts
+endif
ifeq "$(TEST_BUILD)" "y"
_tsk_lst_file:=ec.tasklist
_tsk_lst:=$(shell echo "CONFIG_TASK_LIST CONFIG_TEST_TASK_LIST" | \
@@ -66,17 +69,20 @@ ifeq "$(TEST_BUILD)" "y"
-D"TASK_TEST(n, r, d, s)=n" -imacros $(_tsk_lst_file) \
-imacros $(PROJECT).tasklist)
else ifdef CTS_MODULE
- _tsk_lst_file:=$(PROJECT).tasklist
- _tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \
- -I$(BDIR) -D"TASK_NOTEST(n, r, d, s)=n" -D"TASK_CTS(n, r, d, s)=n" \
- -D"TASK_ALWAYS(n, r, d, s)=n" -imacros $(_tsk_lst_file))
+ _tsk_lst_file:=ec.tasklist
+ _tsk_lst:=$(shell echo "CONFIG_TASK_LIST CONFIG_CTS_TASK_LIST" | \
+ $(CPP) -P -I cts/$(CTS_MODULE) -Icts -I$(BDIR) \
+ -D"TASK_NOTEST(n, r, d, s)=n" \
+ -D"TASK_ALWAYS(n, r, d, s)=n" \
+ -imacros $(_tsk_lst_file) \
+ -imacros cts.tasklist)
else
_tsk_lst_file:=$(PROJECT).tasklist
_tsk_lst:=$(shell echo "CONFIG_TASK_LIST" | $(CPP) -P \
-I$(BDIR) -D"TASK_NOTEST(n, r, d, s)=n" \
- -D"TASK_CTS(n, r, d, s)=" \
-D"TASK_ALWAYS(n, r, d, s)=n" -imacros $(_tsk_lst_file))
endif
+
_tsk_cfg:=$(foreach t,$(_tsk_lst) ,HAS_TASK_$(t))
CPPFLAGS+=$(foreach t,$(_tsk_cfg),-D$(t))
_flag_cfg:=$(shell $(CPP) $(CPPFLAGS) -P -dM -Ichip/$(CHIP) -I$(BDIR) \