fix: remove 'src/' from modules install path
[lttng-modules.git] / Makefile
1 # SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2
3 ifneq ($(KERNELRELEASE),)
4
5 # This part of the Makefile is used when called by the kernel build system
6 # and defines the modules to be built.
7
8 obj-$(CONFIG_LTTNG) += src/
9
10 else # KERNELRELEASE
11
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.
15
16 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
17 PWD := $(shell pwd)
18 CFLAGS = $(EXTCFLAGS)
19
20 default: modules
21
22 modules:
23 $(MAKE) -C $(KERNELDIR) M=$(PWD)/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules
24
25 modules_install:
26 $(MAKE) -C $(KERNELDIR) M=$(PWD)/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules_install
27
28 clean:
29 $(MAKE) -C $(KERNELDIR) M=$(PWD)/src clean
30
31 %.i: %.c
32 $(MAKE) -C $(KERNELDIR) M=$(PWD)/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m $@
33
34 endif # KERNELRELEASE
This page took 0.029775 seconds and 5 git commands to generate.