e5a34b767ff1afef02b713a6ab93d945acbef074
[AGL/meta-agl-devel.git] / meta-egvirt / recipes-kernel / kernel-module-virtio-video / files / Makefile
1 #
2 # Makefile for mod coqos
3 #
4 KDIR ?= $(KERNEL_SRC)
5 ifeq ($(KDIR),)
6 $(error "KDIR must be specified.")
7 endif
8
9 # The variable "M" is used to point to the location of this module, and it is
10 # passed to kbuild to build this module.
11 #
12 # Allow to specify variable "M" from outside. It is needed to set it to the
13 # relative path to this module. It must be relative to the kernel source
14 # directory.
15 #
16 # If kernel is built with "O" option then setting "M" to the relative path
17 # empowers the build system to put output/object files (.o, .ko.) into a
18 # directory different from the module source directory.
19 M ?= $$PWD
20
21 # Some build systems may rsync module sources out of git repository to have
22 # sources directory untouched during build. Then, they should specify Git
23 # repository directory separately for 'git describe' to work properly.
24 MODULE_GIT_REPOSITORY_DIR ?= $(M)
25
26 default:
27         $(MAKE) -C $(KDIR) M=$(M) MODULE_GIT_REPOSITORY_DIR=$(MODULE_GIT_REPOSITORY_DIR)
28
29 modules_install:
30         $(MAKE) -C $(KDIR) M=$(M) $@
31
32 clean:
33         $(MAKE) -C $(KDIR) M=$(M) $@