4ee8a8e042
This commit adds the capability to the Kbuild system of adding samples and projects to the build process. This commits adds the hello_world and philosophers sample code as an example of how to configure a project into the build system. The project can be hosted inside the kernel source tree or outside the kernel source tree. Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com> Change-Id: Id980e959ac6e0061f8227d5d81191a169bfc8fc3
32 lines
703 B
Makefile
32 lines
703 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 tinymountain.lnk \
|
|
tinymountain.map tinymountain.elf
|
|
rm-dirs := arch drivers include kernel lib misc \
|
|
scripts source
|
|
|
|
clean: FORCE
|
|
$(shell rm $(rm-files))
|
|
$(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) $@
|
|
|
|
PHONY += FORCE
|
|
FORCE:
|
|
|
|
.PHONY: $(PHONY)
|