summaryrefslogtreecommitdiffstats
path: root/meta-egvirt/recipes-kernel/kernel-module-virtio-video/files/Makefile
blob: e5a34b767ff1afef02b713a6ab93d945acbef074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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) $@