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

This commit is contained in:
Masamichi Takagi
2012-10-29 10:26:59 +09:00
committed by Masamichi Takagi m-takagi@ab.jp.nec.com
parent e76bf73403
commit 7027845a4e
2 changed files with 48 additions and 2 deletions

View File

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

46
kernel/Makefile.mpiu Executable file
View File

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