summaryrefslogtreecommitdiffstats
path: root/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Kbuild
diff options
context:
space:
mode:
Diffstat (limited to 'meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Kbuild')
-rw-r--r--meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Kbuild22
1 files changed, 22 insertions, 0 deletions
diff --git a/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Kbuild b/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Kbuild
new file mode 100644
index 00000000..f16a686b
--- /dev/null
+++ b/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Kbuild
@@ -0,0 +1,22 @@
+#
+# Kbuild for the virtio-video driver
+#
+
+# --tags to take into account non-annotated tags
+# --dirty to mark version with uncommitted changes as dirty
+GIT_VERSION = $(shell git -C "$(MODULE_GIT_REPOSITORY_DIR)" describe --tags --dirty | sed 's/^v//')
+
+ccflags-y := -I"$(src)/include/uapi"
+ccflags-y += -DDRIVER_VERSION=\"$(GIT_VERSION)\"
+
+virtio_video-y := \
+ virtio_video_driver.o \
+ virtio_video_vq.o \
+ virtio_video_device.o \
+ virtio_video_dec.o \
+ virtio_video_enc.o \
+ virtio_video_cam.o \
+ virtio_video_caps.o \
+ virtio_video_helpers.o
+
+obj-m += virtio_video.o