fix: block: remove disk_part_iter (v5.12)
[lttng-modules.git] / src / Kbuild
CommitLineData
cfa6cc1d
MD
1# SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2
600da0c9
MJ
3ifdef CONFIG_LOCALVERSION # Check if dot-config is included.
4 ifeq ($(CONFIG_TRACEPOINTS),)
5 $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
6 endif # CONFIG_TRACEPOINTS
7endif # ifdef CONFIG_LOCALVERSION
8
cfa6cc1d
MD
9TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/..
10
600da0c9
MJ
11lttng_check_linux_version = $(shell pwd)/include/linux/version.h
12lttng_check_generated_linux_version = $(shell pwd)/include/generated/uapi/linux/version.h
13
14#
15# Check for stale version.h, which can be a leftover from an old Linux
16# kernel tree moved to a newer kernel version, only pruned by make
17# distclean.
18#
19ifneq ($(wildcard $(lttng_check_linux_version)),)
20 ifneq ($(wildcard $(lttng_check_generated_linux_version)),)
21 $(error Duplicate version.h files found in $(lttng_check_linux_version) and $(lttng_check_generated_linux_version). Consider running make distclean on your kernel, or removing the stale $(lttng_check_linux_version) file)
22 endif
23endif
24
25include $(TOP_LTTNG_MODULES_DIR)/src/Kbuild.common
cfa6cc1d
MD
26
27ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)/include
28
29obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-discard.o
30obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-overwrite.o
31obj-$(CONFIG_LTTNG) += lttng-ring-buffer-metadata-client.o
32obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-mmap-discard.o
33obj-$(CONFIG_LTTNG) += lttng-ring-buffer-client-mmap-overwrite.o
34obj-$(CONFIG_LTTNG) += lttng-ring-buffer-metadata-mmap-client.o
250c663f 35obj-$(CONFIG_LTTNG) += lttng-ring-buffer-event-notifier-client.o
a101fa10
MD
36
37obj-$(CONFIG_LTTNG) += lttng-counter-client-percpu-32-modular.o
38ifneq ($CONFIG_64BIT),)
39 obj-$(CONFIG_LTTNG) += lttng-counter-client-percpu-64-modular.o
40endif # CONFIG_64BIT
41
cfa6cc1d
MD
42obj-$(CONFIG_LTTNG) += lttng-clock.o
43
44obj-$(CONFIG_LTTNG) += lttng-tracer.o
45
46obj-$(CONFIG_LTTNG) += lttng-wrapper.o
47
7ab8c616
FD
48lttng-tracer-objs := lib/msgpack/msgpack.o \
49 lttng-events.o lttng-abi.o lttng-string-utils.o \
cfa6cc1d
MD
50 lttng-probes.o lttng-context.o \
51 lttng-context-pid.o lttng-context-procname.o \
52 lttng-context-prio.o lttng-context-nice.o \
53 lttng-context-vpid.o lttng-context-tid.o \
54 lttng-context-vtid.o lttng-context-ppid.o \
55 lttng-context-vppid.o lttng-context-cpu-id.o \
56 lttng-context-uid.o \
57 lttng-context-euid.o \
58 lttng-context-suid.o \
59 lttng-context-gid.o \
60 lttng-context-egid.o \
61 lttng-context-sgid.o \
62 lttng-context-vuid.o \
63 lttng-context-veuid.o \
64 lttng-context-vsuid.o \
65 lttng-context-vgid.o \
66 lttng-context-vegid.o \
67 lttng-context-vsgid.o \
68 lttng-context-interruptible.o \
69 lttng-context-need-reschedule.o \
437d5aa5 70 lttng-calibrate.o \
cfa6cc1d 71 lttng-context-hostname.o \
437d5aa5 72 lttng-context-callstack.o \
cfa6cc1d
MD
73 probes/lttng.o \
74 lttng-tracker-id.o \
80c2a69a
FD
75 lttng-bytecode.o lttng-bytecode-interpreter.o \
76 lttng-bytecode-specialize.o \
77 lttng-bytecode-validator.o \
cfa6cc1d
MD
78 probes/lttng-probe-user.o \
79 lttng-tp-mempool.o \
21f58fb7 80 lttng-event-notifier-notification.o
cfa6cc1d
MD
81
82lttng-wrapper-objs := wrapper/page_alloc.o \
83 wrapper/random.o \
84 wrapper/trace-clock.o \
85 wrapper/kallsyms.o \
86 wrapper/irqdesc.o \
87 wrapper/fdtable.o \
88 lttng-wrapper-impl.o
89
90ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),)
91 lttng-tracer-objs += lttng-syscalls.o
e42c4f49
FD
92 lttng-tracer-objs += lttng-syscalls-entry-table.o
93 lttng-tracer-objs += lttng-syscalls-entry-compat-table.o
94 lttng-tracer-objs += lttng-syscalls-exit-table.o
95 lttng-tracer-objs += lttng-syscalls-exit-compat-table.o
9857164a 96 lttng-tracer-objs += lttng-syscalls-enum.o
cfa6cc1d
MD
97endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
98
99ifneq ($(CONFIG_PERF_EVENTS),)
100 lttng-tracer-objs += lttng-context-perf-counters.o
101endif # CONFIG_PERF_EVENTS
102
103ifneq ($(CONFIG_PREEMPT_RT_FULL),)
104 lttng-tracer-objs += lttng-context-migratable.o
105 lttng-tracer-objs += lttng-context-preemptible.o
106endif # CONFIG_PREEMPT_RT_FULL
107
108ifneq ($(CONFIG_PREEMPT),)
109 lttng-tracer-objs += lttng-context-preemptible.o
110endif
111
112lttng-tracer-objs += $(shell \
113 if [ $(VERSION) -ge 4 \
114 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 \) ] ; then \
115 echo "lttng-tracepoint.o" ; fi;)
116
117lttng-tracer-objs += lttng-context-cgroup-ns.o
118
119ifneq ($(CONFIG_IPC_NS),)
120 lttng-tracer-objs += lttng-context-ipc-ns.o
121endif
122
123ifneq ($(wildcard $(mnt_ns_dep)),)
124 lttng-tracer-objs += lttng-context-mnt-ns.o
125endif
126
127ifneq ($(CONFIG_NET_NS),)
128 lttng-tracer-objs += lttng-context-net-ns.o
129endif
130
131ifneq ($(CONFIG_PID_NS),)
132 lttng-tracer-objs += lttng-context-pid-ns.o
133endif
134
135ifneq ($(CONFIG_USER_NS),)
136 lttng-tracer-objs += lttng-context-user-ns.o
137endif
138
139ifneq ($(CONFIG_UTS_NS),)
140 lttng-tracer-objs += lttng-context-uts-ns.o
141endif
142
876e2e92
MJ
143ifneq ($(CONFIG_TIME_NS),)
144 lttng-tracer-objs += lttng-context-time-ns.o
145endif
146
cfa6cc1d
MD
147obj-$(CONFIG_LTTNG) += lttng-statedump.o
148lttng-statedump-objs := lttng-statedump-impl.o
149
150obj-$(CONFIG_LTTNG) += probes/
151obj-$(CONFIG_LTTNG) += lib/
600da0c9 152obj-$(CONFIG_LTTNG) += tests/
This page took 0.040096 seconds and 4 git commands to generate.