Fix: timer_expire_entry changed in 4.19.312
[lttng-modules.git] / Makefile
... / ...
CommitLineData
1# SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2
3ifneq ($(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
8obj-$(CONFIG_LTTNG) += src/
9
10else # 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
16KERNELDIR ?= /lib/modules/$(shell uname -r)/build
17PWD := $(shell pwd)
18
19# Experimental bitwise enum defaults to disabled.
20CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM ?= n
21
22# Emulate Kconfig behavior of setting defines for config options.
23LKCPPFLAGS = $(KCPPFLAGS)
24ifeq ($(CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM),y)
25LKCPPFLAGS += -DCONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM=y
26endif
27
28default: modules
29
30modules:
31 $(MAKE) -C $(KERNELDIR) M=$(PWD)/src \
32 CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
33 KCPPFLAGS='$(LKCPPFLAGS)' \
34 modules
35
36modules_install:
37 $(MAKE) -C $(KERNELDIR) M=$(PWD)/src \
38 CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
39 KCPPFLAGS='$(LKCPPFLAGS)' \
40 modules_install
41
42clean:
43 $(MAKE) -C $(KERNELDIR) M=$(PWD)/src clean
44
45# The following targets are used for development and debugging. They are not
46# part of the build system.
47%.i: %.c
48 $(MAKE) -C $(KERNELDIR) M=$(PWD) \
49 CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
50 KCPPFLAGS='$(LKCPPFLAGS)' \
51 $@
52
53%.o: %.c
54 $(MAKE) -C $(KERNELDIR) M=$(PWD) \
55 CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
56 KCPPFLAGS='$(LKCPPFLAGS)' \
57 $@
58
59endif # KERNELRELEASE
This page took 0.031707 seconds and 4 git commands to generate.