aboutsummaryrefslogtreecommitdiffstats
path: root/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile')
-rw-r--r--meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile b/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
new file mode 100644
index 00000000..e5a34b76
--- /dev/null
+++ b/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
@@ -0,0 +1,33 @@
+#
+# Makefile for mod coqos
+#
+KDIR ?= $(KERNEL_SRC)
+ifeq ($(KDIR),)
+$(error "KDIR must be specified.")
+endif
+
+# The variable "M" is used to point to the location of this module, and it is
+# passed to kbuild to build this module.
+#
+# Allow to specify variable "M" from outside. It is needed to set it to the
+# relative path to this module. It must be relative to the kernel source
+# directory.
+#
+# If kernel is built with "O" option then setting "M" to the relative path
+# empowers the build system to put output/object files (.o, .ko.) into a
+# directory different from the module source directory.
+M ?= $$PWD
+
+# Some build systems may rsync module sources out of git repository to have
+# sources directory untouched during build. Then, they should specify Git
+# repository directory separately for 'git describe' to work properly.
+MODULE_GIT_REPOSITORY_DIR ?= $(M)
+
+default:
+ $(MAKE) -C $(KDIR) M=$(M) MODULE_GIT_REPOSITORY_DIR=$(MODULE_GIT_REPOSITORY_DIR)
+
+modules_install:
+ $(MAKE) -C $(KDIR) M=$(M) $@
+
+clean:
+ $(MAKE) -C $(KDIR) M=$(M) $@