build scripts: support for separate build and source directories

This commit is contained in:
bgerofi@riken.jp
2014-10-20 17:47:12 +09:00
committed by Balazs Gerofi bgerofi@riken.jp
parent 11947a4ce3
commit 658ff759ef
6 changed files with 1752 additions and 1494 deletions

3225
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -142,6 +142,7 @@ AC_CONFIG_FILES([
executer/user/Makefile
executer/kernel/Makefile
kernel/Makefile
kernel/Makefile.build
arch/x86/tools/mcreboot-attached-mic.sh
arch/x86/tools/mcshutdown-attached-mic.sh
arch/x86/tools/mcreboot.1:arch/x86/tools/mcreboot.1in

View File

@@ -1,20 +1,21 @@
KDIR ?= @KDIR@
ARCH ?= @ARCH@
src ?= $(shell pwd)
src = @abs_srcdir@
KMODDIR=@KMODDIR@
IHK_BASE=$(src)/../../../ihk
obj-m += mcctrl.o
mcctrl-objs := driver.o control.o ikc.o syscall.o procfs.o
ccflags-y := -I$(IHK_BASE)/linux/include -I$(IHK_BASE)/ikc/include -I$(IHK_BASE)/include -I$(src)/../include
IHK_BASE=$(src)/../../../ihk
EXTRA_CFLAGS = -I$(IHK_BASE)/linux/include -I$(IHK_BASE)/ikc/include -I$(IHK_BASE)/include -I$(src)/../include
KBUILD_EXTRA_SYMBOLS = $(IHK_BASE)/linux/core/Module.symvers
mcctrl-y := driver.o control.o ikc.o syscall.o procfs.o
KBUILD_EXTRA_SYMBOLS = @abs_builddir@/../../../ihk/linux/core/Module.symvers
.PHONY: clean install modules
modules:
$(MAKE) -C $(KDIR) M=$(PWD) ARCH=$(ARCH) modules
$(MAKE) -C $(KDIR) M=$(PWD) SUBDIRS=$(PWD) ARCH=$(ARCH) modules
clean:
$(RM) .*.cmd *.mod.c *.o *.ko* Module.symvers modules.order -r .tmp*

View File

@@ -1,6 +1,7 @@
CC=@CC@
BINDIR=@BINDIR@
CFLAGS=-Wall -O -fPIE -pie
VPATH=@abs_srcdir@
TARGET=mcexec
all: $(TARGET)

View File

@@ -1,3 +1,5 @@
VPATH=@abs_srcdir@
SRC=$(VPATH)
IHKDIR=$(IHKBASE)/$(TARGETDIR)
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 timer.o plist.o fileobj.o shmobj.o

View File

@@ -1,8 +1,8 @@
BUILD_TARGET ?= @TARGET@
KERNDIR=@KERNDIR@
SRC = $(CURDIR)
VPATH=@abs_srcdir@
IHKBASE ?= $(SRC)/../../ihk/cokernel
IHKBASE ?= $(VPATH)/../../ihk/cokernel
O ?= $(CURDIR)/build
V ?= $(VERBOSE)