remove configure generated files

This commit is contained in:
Tomoki Shirasawa
2013-05-02 10:57:10 +09:00
parent e09160cce7
commit fcd5d65f65
4 changed files with 0 additions and 179 deletions

View File

@@ -1,19 +0,0 @@
KDIR ?= /lib/modules/`uname -r `/build
obj-m += mcctrl.o
mcctrl-objs := driver.o control.o ikc.o syscall.o
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
.PHONY: clean install
modules:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
$(RM) .*.cmd *.mod.c *.o *.ko* Module.symvers modules.order -r .tmp*
install:

View File

@@ -1,16 +0,0 @@
#CC=/usr/linux-k1om-4.7/bin/x86_64-k1om-linux-gcc
CC=gcc
CFLAGS=-Wall -O
TARGET=mcexec
all: $(TARGET)
mcexec: mcexec.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -pthread -o $@ $^ $(EXTRA_OBJS)
clean:
$(RM) $(TARGET) *.o
.PHONY: all clean

View File

@@ -1,40 +0,0 @@
#BUILD_TARGET = builtin-mic attached-mic
BUILD_TARGET ?= attached-mic
SRC = $(CURDIR)
IHKBASE ?= $(SRC)/../../ihk/cokernel
O ?= $(KBUILD_OUTPUT)
V ?= $(VERBOSE)
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 $(IHKBASE)/Makefile),,\
# $(error IHK is not found in $(IHKBASE)))
.PHONY: all clean depend
all: $(KERNELS)
%/kernel.img: %/Makefile
@echo 'Building for' $(dir $@)
@make --no-print-directory -C $(dir $@) $(SUBCMD_OPTS)
%/Makefile: Makefile.build FORCE
@mkdir -p $(dir $@)
@echo 'SRC = $(SRC)' > $@
@echo 'IHKBASE = $(IHKBASE)' >> $@
@echo 'TARGET = $(notdir $(patsubst %/,%,$(dir $@)))' >> $@
@echo 'TARGETDIR = $$(shell echo $$(TARGET) | sed "s/-/\//")' >> $@
@cat Makefile.build >> $@
@rm -f $(dir $@)/Makefile.dep
clean: $(addsuffix .clean,$(BUILD_TARGET))
%.clean: $(O)/%/Makefile
@make --no-print-directory -C $(O)/$(basename $@) $(SUBCMD_OPTS) clean
FORCE:

104
make.sh
View File

@@ -1,104 +0,0 @@
#!/bin/sh
MOPT=
OPT=
ihkdir=`pwd`/../ihk
installdir=
kerneldir=
target=
cleanflag=
while [ "X$1" != X ]; do
case "$1" in
clean)
cleanflag=1
;;
installdir=*)
installdir="`echo $1 | sed 's/^installdir=//'`"
;;
ihkdir=*)
ihkdir="`echo $1 | sed 's/^ihkdir=//'`"
;;
kerneldir=*)
kerneldir="`echo $1 | sed 's/^kerneldir=//'`"
;;
target=*)
target="`echo $1 | sed 's/^target=//'`"
;;
*)
echo "unknown option $1" >&2
exit 1
;;
esac
shift
done
if [ "X$cleanflag" != X ]; then
(cd executer/kernel; make clean)
(cd executer/user; make clean)
rm -rf kernel/build
exit 0
fi
if [ "X$target" = X ]; then
if [ -f $ihkdir/target ]; then
target="`cat $ihkdir/target`"
fi
fi
if [ "X$target" = X ]; then
target=attached-mic
fi
if [ "X$kerneldir" = X ]; then
if [ -f $ihkdir/kerneldir ]; then
kerneldir="`cat $ihkdir/kerneldir`"
fi
fi
if [ "X$kerneldir" != X ]; then
MOPT="KDIR=$kerneldir"
fi
if [ "X$target" = "Xbuiltin-mic" ]; then
MOPT="$MOPT ARCH=k1om"
OPT="CC=x86_64-k1om-linux-gcc"
fi
if [ "X$installdir" != X ]; then
mkdir -p "$installdir"
fi
(cd executer/kernel; make $MOPT)
if [ -f executer/kernel/mcctrl.ko ]; then
if [ "X$installdir" != X ]; then
cp executer/kernel/mcctrl.ko "$installdir"
fi
else
echo "executer/kernel/mcctrl.ko could not be built" >&2
exit 1
fi
case "$target" in
attached-mic | builtin-x86 | builtin-mic)
(cd kernel; mkdir -p build; make O=`pwd`/build BUILD_TARGET=$target)
krn=kernel/build/$target/kernel.img
;;
*)
echo "unknown target $target" >&2
exit 1
;;
esac
if [ -f $krn ]; then
if [ "X$installdir" != X ]; then
cp $krn "$installdir"
fi
else
echo "$krn could not be built" >&2
exit 1
fi
(cd executer/user; make $OPT)
if [ -f executer/user/mcexec ]; then
if [ "X$installdir" != X ]; then
cp executer/user/mcexec "$installdir"
fi
else
echo "executer/user/mcexec could not be built" >&2
exit 1
fi