probes: remove compatibility build code
[lttng-modules.git] / probes / Kbuild
... / ...
CommitLineData
1# SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
2
3TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/..
4
5include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common
6
7ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
8
9obj-$(CONFIG_LTTNG) += lttng-probe-sched.o
10obj-$(CONFIG_LTTNG) += lttng-probe-irq.o
11obj-$(CONFIG_LTTNG) += lttng-probe-timer.o
12obj-$(CONFIG_LTTNG) += lttng-probe-kmem.o
13obj-$(CONFIG_LTTNG) += lttng-probe-module.o
14obj-$(CONFIG_LTTNG) += lttng-probe-power.o
15obj-$(CONFIG_LTTNG) += lttng-probe-statedump.o
16
17ifneq ($(CONFIG_NET_9P),)
18 obj-$(CONFIG_LTTNG) += lttng-probe-9p.o
19endif # CONFIG_NET_9P
20
21i2c_dep = $(srctree)/include/trace/events/i2c.h
22ifneq ($(wildcard $(i2c_dep)),)
23 obj-$(CONFIG_LTTNG) += lttng-probe-i2c.o
24endif
25
26ifneq ($(CONFIG_KVM),)
27 obj-$(CONFIG_LTTNG) += lttng-probe-kvm.o
28 ifneq ($(CONFIG_X86),)
29 kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h
30 ifneq ($(wildcard $(kvm_dep_lapic)),)
31 kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
32 ifneq ($(wildcard $(kvm_dep)),)
33 CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
34 CFLAGS_lttng-probe-kvm-x86-mmu.o += -I$(srctree)/virt/kvm
35 obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86.o
36 obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86-mmu.o
37 else
38 $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.)
39 endif # $(wildcard $(kvm_dep))
40 else
41 $(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.)
42 endif # $(wildcard $(kvm_dep_lapic))
43 endif # CONFIG_X86
44endif # CONFIG_KVM
45
46ifneq ($(CONFIG_X86),)
47 x86_irq_vectors_dep = $(srctree)/arch/x86/include/asm/trace/irq_vectors.h
48
49 ifneq ($(wildcard $(x86_irq_vectors_dep)),)
50 obj-$(CONFIG_LTTNG) += lttng-probe-x86-irq-vectors.o
51 endif # $(wildcard $(x86_irq_vectors_dep))
52
53 x86_exceptions_dep = $(srctree)/arch/x86/include/asm/trace/exceptions.h
54
55 ifneq ($(wildcard $(x86_exceptions_dep)),)
56 obj-$(CONFIG_LTTNG) += lttng-probe-x86-exceptions.o
57 endif # $(wildcard $(x86_exceptions_dep))
58endif # CONFIG_X86
59
60obj-$(CONFIG_LTTNG) += lttng-probe-signal.o
61
62ifneq ($(CONFIG_BLOCK),)
63 # need blk_cmd_buf_len
64 ifneq ($(CONFIG_EVENT_TRACING),)
65 obj-$(CONFIG_LTTNG) += lttng-probe-block.o
66 endif # CONFIG_EVENT_TRACING
67endif # CONFIG_BLOCK
68
69ifneq ($(CONFIG_NET),)
70 obj-$(CONFIG_LTTNG) += lttng-probe-napi.o
71 obj-$(CONFIG_LTTNG) += lttng-probe-skb.o
72 obj-$(CONFIG_LTTNG) += lttng-probe-net.o
73 obj-$(CONFIG_LTTNG) += lttng-probe-sock.o
74 obj-$(CONFIG_LTTNG) += lttng-probe-udp.o
75endif # CONFIG_NET
76
77ifneq ($(CONFIG_GPIOLIB),)
78 obj-$(CONFIG_LTTNG) += lttng-probe-gpio.o
79endif # CONFIG_GPIOLIB
80
81ifneq ($(CONFIG_JBD2),)
82 obj-$(CONFIG_LTTNG) += lttng-probe-jbd2.o
83endif # CONFIG_JBD2
84
85ifneq ($(CONFIG_REGULATOR),)
86 obj-$(CONFIG_LTTNG) += lttng-probe-regulator.o
87endif # CONFIG_REGULATOR
88
89ifneq ($(CONFIG_SCSI),)
90 obj-$(CONFIG_LTTNG) += lttng-probe-scsi.o
91endif # CONFIG_SCSI
92
93obj-$(CONFIG_LTTNG) += lttng-probe-vmscan.o
94
95# lock probe does not work, so disabling it for now
96#ifneq ($(CONFIG_LOCKDEP),)
97# obj-$(CONFIG_LTTNG) += lttng-probe-lock.o
98#endif # CONFIG_LOCKDEP
99
100ifneq ($(CONFIG_BTRFS_FS),)
101 btrfs_dep = $(srctree)/fs/btrfs/*.h
102 ifneq ($(wildcard $(btrfs_dep)),)
103 obj-$(CONFIG_LTTNG) += lttng-probe-btrfs.o
104 else
105 $(warning Files $(btrfs_dep) not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.)
106 endif # $(wildcard $(btrfs_dep))
107endif # CONFIG_BTRFS_FS
108
109obj-$(CONFIG_LTTNG) += lttng-probe-compaction.o
110
111ifneq ($(CONFIG_EXT4_FS),)
112 ext4_dep = $(srctree)/fs/ext4/*.h
113 ifneq ($(wildcard $(ext4_dep)),)
114 obj-$(CONFIG_LTTNG) += lttng-probe-ext4.o
115 else
116 $(warning Files $(ext4_dep) not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.)
117 endif # $(wildcard $(ext4_dep))
118endif # CONFIG_EXT4_FS
119
120obj-$(CONFIG_LTTNG) += lttng-probe-printk.o
121
122ifneq ($(CONFIG_FRAME_WARN),0)
123 CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200
124endif
125
126obj-$(CONFIG_LTTNG) += lttng-probe-random.o
127
128obj-$(CONFIG_LTTNG) += lttng-probe-rcu.o
129
130ifneq ($(CONFIG_REGMAP),)
131 regmap_dep_4_1 = $(srctree)/drivers/base/regmap/trace.h
132 ifneq ($(wildcard $(regmap_dep_4_1)),)
133 obj-$(CONFIG_LTTNG) += lttng-probe-regmap.o
134 else
135 $(warning File $(regmap_dep_4_1) not found. Probe "regmap" is disabled. Need Linux 4.1+ kernel source tree to enable it.)
136 endif # $(wildcard $(regmap_dep_4_1)),
137endif # CONFIG_REGMAP
138
139ifneq ($(CONFIG_PM_RUNTIME),)
140 obj-$(CONFIG_LTTNG) += lttng-probe-rpm.o
141endif # CONFIG_PM_RUNTIME
142
143ifneq ($(CONFIG_SUNRPC),)
144 obj-$(CONFIG_LTTNG) += lttng-probe-sunrpc.o
145endif # CONFIG_SUNRPC
146
147ifneq ($(CONFIG_VIDEO_V4L2),)
148 obj-$(CONFIG_LTTNG) += lttng-probe-v4l2.o
149endif # CONFIG_VIDEO_V4L2
150
151obj-$(CONFIG_LTTNG) += lttng-probe-workqueue.o
152
153obj-$(CONFIG_LTTNG) += lttng-probe-writeback.o
154
155ifneq ($(CONFIG_KPROBES),)
156 obj-$(CONFIG_LTTNG) += lttng-kprobes.o
157endif # CONFIG_KPROBES
158
159ifneq ($(CONFIG_UPROBES),)
160 obj-$(CONFIG_LTTNG) += lttng-uprobes.o
161endif # CONFIG_UPROBES
162
163ifneq ($(CONFIG_KRETPROBES),)
164 obj-$(CONFIG_LTTNG) += lttng-kretprobes.o
165endif # CONFIG_KRETPROBES
166
167ifneq ($(CONFIG_PREEMPTIRQ_EVENTS),)
168 obj-$(CONFIG_LTTNG) += lttng-probe-preemptirq.o
169endif # CONFIG_PREEMPTIRQ_EVENTS
170
171# vim:syntax=make
This page took 0.02374 seconds and 4 git commands to generate.