Split syscall tracepoint generation in their own files
[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 \
7633c773 88 wrapper/genhd.o \
cfa6cc1d
MD
89 lttng-wrapper-impl.o
90
91ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),)
92 lttng-tracer-objs += lttng-syscalls.o
e42c4f49
FD
93 lttng-tracer-objs += lttng-syscalls-entry-table.o
94 lttng-tracer-objs += lttng-syscalls-entry-compat-table.o
95 lttng-tracer-objs += lttng-syscalls-exit-table.o
96 lttng-tracer-objs += lttng-syscalls-exit-compat-table.o
9857164a 97 lttng-tracer-objs += lttng-syscalls-enum.o
cfa6cc1d
MD
98endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
99
100ifneq ($(CONFIG_PERF_EVENTS),)
101 lttng-tracer-objs += lttng-context-perf-counters.o
102endif # CONFIG_PERF_EVENTS
103
104ifneq ($(CONFIG_PREEMPT_RT_FULL),)
105 lttng-tracer-objs += lttng-context-migratable.o
106 lttng-tracer-objs += lttng-context-preemptible.o
107endif # CONFIG_PREEMPT_RT_FULL
108
109ifneq ($(CONFIG_PREEMPT),)
110 lttng-tracer-objs += lttng-context-preemptible.o
111endif
112
113lttng-tracer-objs += $(shell \
114 if [ $(VERSION) -ge 4 \
115 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 \) ] ; then \
116 echo "lttng-tracepoint.o" ; fi;)
117
118lttng-tracer-objs += lttng-context-cgroup-ns.o
119
120ifneq ($(CONFIG_IPC_NS),)
121 lttng-tracer-objs += lttng-context-ipc-ns.o
122endif
123
124ifneq ($(wildcard $(mnt_ns_dep)),)
125 lttng-tracer-objs += lttng-context-mnt-ns.o
126endif
127
128ifneq ($(CONFIG_NET_NS),)
129 lttng-tracer-objs += lttng-context-net-ns.o
130endif
131
132ifneq ($(CONFIG_PID_NS),)
133 lttng-tracer-objs += lttng-context-pid-ns.o
134endif
135
136ifneq ($(CONFIG_USER_NS),)
137 lttng-tracer-objs += lttng-context-user-ns.o
138endif
139
140ifneq ($(CONFIG_UTS_NS),)
141 lttng-tracer-objs += lttng-context-uts-ns.o
142endif
143
876e2e92
MJ
144ifneq ($(CONFIG_TIME_NS),)
145 lttng-tracer-objs += lttng-context-time-ns.o
146endif
147
cfa6cc1d
MD
148obj-$(CONFIG_LTTNG) += lttng-statedump.o
149lttng-statedump-objs := lttng-statedump-impl.o
150
151obj-$(CONFIG_LTTNG) += probes/
152obj-$(CONFIG_LTTNG) += lib/
600da0c9 153obj-$(CONFIG_LTTNG) += tests/
This page took 0.040123 seconds and 4 git commands to generate.