>From aaa820fa9ec6ff5a8e9dd07abf70f6becc249cd9 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 24 Oct 2008 12:45:44 +0200 Subject: [PATCH] Cleanup build system for Linux Cleanup root makefile /wrt Linux module building. Add a distclean rule. Signed-off-by: Jan Kiszka --- Makefile | 20 +++++++++++--------- common/Makefile | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 51e0a02..5a2607a 100644 --- a/Makefile +++ b/Makefile @@ -14,10 +14,8 @@ else ifdef CONFIG_KBUILD26 # 2.6 build -all: kqemu.ko - -kqemu.ko: - make -C common all +all: + make -C common monitor-image.h make -C $(KERNEL_PATH) M=`pwd` modules else @@ -38,7 +36,11 @@ endif # !CONFIG_WIN32 clean: $(MAKE) -C common clean - rm -f kqemu.ko *.o *~ + rm -rf kqemu.ko *.o *~ .kqemu* Module.* modules.order kqemu.mod.c .tmp_versions \ + common/.kernel* common/*/.kernel* + +distclean: clean + rm -rf config-host.mak FILES=configure Makefile README Changelog LICENSE COPYING \ install.sh kqemu-linux.c kqemu.h \ @@ -89,10 +91,10 @@ kqemu.o: $(kqemu-objs) else # called from 2.6 kernel kbuild -obj-m:= kqemu.o -kqemu-objs:= kqemu-linux.o kqemu-mod.o +EXTRA_AFLAGS := -I $(M)/common +EXTRA_CFLAGS := -I $(M) -$(obj)/kqemu-mod.o: $(src)/kqemu-mod-$(ARCH).o - cp $< $@ +obj-m := kqemu.o +kqemu-objs := kqemu-linux.o common/kernel.o common/$(ARCH)/kernel_asm.o endif endif # PATCHLEVEL diff --git a/common/Makefile b/common/Makefile index 181c777..9d109ab 100644 --- a/common/Makefile +++ b/common/Makefile @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # -include ../config-host.mak +-include ../config-host.mak #CONFIG_WIN32=y #ARCH=i386 #ARCH=x86_64 -- 1.5.6