1 # SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
3 ifneq ($(KERNELRELEASE
),)
5 # This part of the Makefile is used when called by the kernel build system
6 # and defines the modules to be built.
8 obj-
$(CONFIG_LTTNG
) += src
/
12 # This part of the Makefile is used when the 'make' command is runned in the
13 # base directory of the lttng-modules sources. It sets some environment and
14 # calls the kernel build system to build the actual modules.
16 KERNELDIR ?
= /lib
/modules
/$(shell uname
-r
)/build
23 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
)/src CONFIG_LTTNG
=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST
=m modules
26 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
)/src CONFIG_LTTNG
=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST
=m modules_install
29 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
)/src
clean
31 # The following targets are used for development and debugging. They are not
32 # part of the build system.
34 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) CONFIG_LTTNG
=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST
=m
$@
37 $(MAKE
) -C
$(KERNELDIR
) M
=$(PWD
) CONFIG_LTTNG
=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST
=m
$@