Kernel: initial version

This commit is contained in:
Taku Shimosawa
2011-09-22 18:57:51 +09:00
parent 1b054d6e1e
commit 1311337438
9 changed files with 148 additions and 0 deletions

26
kernel/Makefile Normal file
View File

@@ -0,0 +1,26 @@
BUILD_TARGET = mee knf
BUILD_DIR = ../../build/mcos
SRC = $PWD
KERNEL = kernel.img
KERNELS = $(addsuffix /$(KERNEL),$(addprefix $(BUILD_DIR)/,$(BUILD_TARGET)))
.PHONY: all clean
all: $(KERNELS)
%/kernel.img: %/Makefile
make -C $(dir $@)
%/Makefile: Makefile.build FORCE
@mkdir -p $(dir $@)
@echo 'SRC = $(PWD)' > $@
@echo 'TARGET = $(notdir $(patsubst %/,%,$(dir $@)))' >> $@
@cat Makefile.build >> $@
clean: $(addsuffix .clean,$(BUILD_TARGET))
%.clean: $(BUILD_DIR)/%/Makefile
make -C $(BUILD_DIR)/$(basename $@) clean
FORCE: