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>
This commit is contained in:
Olof Johansson
2019-02-15 09:16:47 +05:30
committed by Anup Patel
parent 286b80768b
commit 868e20df8b
4 changed files with 35 additions and 6 deletions

View File

@@ -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