aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2019-02-15 09:16:47 +0530
committerAnup Patel <anup@brainfault.org>2019-02-15 15:54:44 +0530
commit868e20df8b302c20782026a806dda317b76655e9 (patch)
tree621a78fadd96f831d67b2252e001900b015120b3 /Makefile
parent286b80768beb16130f869877875af2f581439b2b (diff)
Makefile: Add 'make run' command for platform specific run
Makes for easy and quick build-run one-stop command. For now only added for qemu targets. It can be added for any platform having simulator/emulator (such as QEMU). Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 32f6aa8..2433085 100644
--- a/Makefile
+++ b/Makefile
@@ -316,6 +316,21 @@ all-deps-2 = $(if $(findstring clean,$(MAKECMDGOALS)),,$(all-deps-1))
# Include external dependency of firmwares after default Makefile rules
include $(src_dir)/firmware/external_deps.mk
+# Convenient "make run" command for emulated platforms
+.PHONY: run
+run: all
+ifneq ($(platform-runcmd),)
+ $(platform-runcmd) $(RUN_ARGS)
+else
+ifdef PLATFORM
+ @echo Platform $(PLATFORM) doesn't specify a run command
+ @false
+else
+ @echo Run command only available when targeting a platform
+ @false
+endif
+endif
+
install_targets-y = install_libsbi
ifdef PLATFORM
install_targets-y += install_libplatsbi