2 # Makefile for mod coqos
6 $(error "KDIR must be specified.")
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.
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
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.
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)
27 $(MAKE) -C $(KDIR) M=$(M) MODULE_GIT_REPOSITORY_DIR=$(MODULE_GIT_REPOSITORY_DIR)
30 $(MAKE) -C $(KDIR) M=$(M) $@
33 $(MAKE) -C $(KDIR) M=$(M) $@