zephyr/Makefile.inc
Juan Manuel Cruz e7de0f65b4 Kbuild: QEMU target.
This commit adds support for the qemu target.
This target will generate the kernel binary and will
launch a qemu instance running the binary.
Currently, only the x86 generic pc and the arm tilm3s6965
BSPs are supported with emulation.

Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Change-Id: I9e71d3ce2fba98572830475a2e15e3fceb0216b4
2016-02-05 20:14:05 -05:00

36 lines
800 B
Makefile

PROJECT_BASE = $(shell pwd)
ARCH?=x86
export ARCH CFLAGS LDFLAGS KBUILD_DEFCONFIG
all: FORCE
$(Q)$(MAKE) -C $(TIMO_BASE) O=$(PROJECT_BASE) \
PROJECT=$(PROJECT_BASE) VPFILE=$(VPFILE)
rm-files:= final-linker.cmd linker.cmd modules.order \
staticIdt.o System.map *kernel.lnk \
*kernel.map *kernel.elf
rm-dirs := arch drivers include kernel lib misc \
scripts source
clean: FORCE
$(shell rm $(rm-files) -f)
$(shell rm $(rm-dirs) -r)
mrproper: clean
$(Q)$(MAKE) -C $(TIMO_BASE) \
PROJECT=$(PROJECT_BASE) VPFILE=$(VPFILE) mrproper
%config: FORCE
$(Q)$(MAKE) -C $(TIMO_BASE) O=$(PROJECT_BASE) \
PROJECT=$(PROJECT_BASE) VPFILE=$(VPFILE) $@
qemu: FORCE
$(Q)$(MAKE) -C $(TIMO_BASE) O=$(PROJECT_BASE) \
PROJECT=$(PROJECT_BASE) VPFILE=$(VPFILE) qemu
PHONY += FORCE
FORCE:
.PHONY: $(PHONY)