From 7027845a4ea6a70b0fb637710c8c297319c9c2a6 Mon Sep 17 00:00:00 2001 From: Masamichi Takagi Date: Mon, 29 Oct 2012 10:26:59 +0900 Subject: [PATCH] add mcos/kernel/{Makefile.mpiu,Makefile.build.mpiu}, which are used from dcfampi_u_make.sh. The difference from {Makefile,Makefile.build} is that it links DCFAMPI kernel functions in mccmd/client to mcos kernel --- kernel/Makefile.build.mpiu | 4 ++-- kernel/Makefile.mpiu | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100755 kernel/Makefile.mpiu diff --git a/kernel/Makefile.build.mpiu b/kernel/Makefile.build.mpiu index 5bac4b4e..b1772db3 100755 --- a/kernel/Makefile.build.mpiu +++ b/kernel/Makefile.build.mpiu @@ -1,10 +1,10 @@ AALDIR=$(AALBASE)/$(TARGET) OBJS = init.o mem.o debug.o mikc.o listeners.o ap.o syscall.o cls.o host.o -OBJS += process.o copy.o waitq.o futex.o +OBJS += process.o copy.o waitq.o futex.o timer.o DEPSRCS=$(wildcard $(SRC)/*.c) #CFLAGS += -I$(SRC)/include -mcmodel=kernel -D__KERNEL__ -DDCFA_KMOD -DIOCTL_FUNC_EXTENSION -CFLAGS += -I$(SRC)/include -mcmodel=kernel -D__KERNEL__ -DDCFA_KMOD -DKNC_MAP_MICPA -DUSE_NOCACHE_MMAP +CFLAGS += -I$(SRC)/include -mcmodel=kernel -D__KERNEL__ -DDCFA_KMOD -DKNC_MAP_MICPA CFLAGS += -DCONFIG_$(CONFIG_V) LDFLAGS += -e arch_start diff --git a/kernel/Makefile.mpiu b/kernel/Makefile.mpiu new file mode 100755 index 00000000..ec51ce2e --- /dev/null +++ b/kernel/Makefile.mpiu @@ -0,0 +1,46 @@ +#BUILD_TARGET = mee knf +BUILD_TARGET = knf +SRC = $(CURDIR) +CONFIG_V ?= KNF + +AALBASE ?= $(SRC)/../../aal/manycore +O ?= $(KBUILD_OUTPUT) +V ?= $(VERBOSE) + +EXTRA_OBJS ?= + +KERNEL = kernel.img +KERNELS = $(addsuffix /$(KERNEL),$(addprefix $(O)/,$(BUILD_TARGET))) + +SUBCMD_OPTS = V='$(V)' + +$(if $(O),,$(error Specify the compilation target directory)) +$(if $(shell ls $(AALBASE)/Makefile),,\ + $(error AAL is not found in $(AALBASE))) + +.PHONY: all clean depend + +all: $(KERNELS) + +%/kernel.img: %/Makefile + @echo 'Building for' $(dir $@) + @make --no-print-directory -C $(dir $@) $(SUBCMD_OPTS) + +%/Makefile: Makefile.build.mpiu FORCE + rm -f $@ + @mkdir -p $(dir $@) + @echo 'SRC = $(SRC)' > $@ + @echo 'AALBASE = $(AALBASE)' >> $@ + @echo 'CONFIG_V = $(CONFIG_V)' >> $@ + @echo 'TARGET = $(notdir $(patsubst %/,%,$(dir $@)))' >> $@ + @echo 'CONFIG_V = $(CONFIG_V)' >> $@ + @echo 'EXTRA_OBJS = $(EXTRA_OBJS)' >> $@ + @cat Makefile.build.mpiu >> $@ + @rm -f $(dir $@)/Makefile.dep + +clean: $(addsuffix .clean,$(BUILD_TARGET)) + +%.clean: $(O)/%/Makefile + @make --no-print-directory -C $(O)/$(basename $@) $(SUBCMD_OPTS) clean + +FORCE: