aboutsummaryrefslogtreecommitdiffstats
path: root/tools/remus/kmod/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/remus/kmod/Makefile')
-rw-r--r--tools/remus/kmod/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/remus/kmod/Makefile b/tools/remus/kmod/Makefile
new file mode 100644
index 0000000000..5780269086
--- /dev/null
+++ b/tools/remus/kmod/Makefile
@@ -0,0 +1,24 @@
+XEN_ROOT=../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+# Should make makefiles export linux build directory!
+# This is a fragile hack to tide us over
+ifeq ($(KERNELS),linux-2.6-xen)
+LINUX_VER=2.6.18-xen
+endif
+ifeq ($(KERNELS),linux-2.6-xen0)
+LINUX_VER=2.6.18-xen0
+endif
+
+KERNELDIR ?= $(XEN_ROOT)/build-linux-$(LINUX_VER)_$(XEN_TARGET_ARCH)
+
+.PHONY: all
+all:
+ if test -d $(KERNELDIR); then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` modules; fi
+
+.PHONY: install
+install:
+ if test -d $(KERNELDIR); then $(MAKE) -C $(KERNELDIR) SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) modules_install; fi
+
+clean::
+ -rm -rf *.o *.ko *.mod.c *.mod.o Module.symvers .*.cmd .tmp_versions