Import uuid.h from lttng-tools
[deliverable/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 50 lttng-probes.o lttng-context.o \
2340dd1b 51 metadata-printer.o \
7b882679 52 ctf1-8.o \
cfa6cc1d
MD
53 lttng-context-pid.o lttng-context-procname.o \
54 lttng-context-prio.o lttng-context-nice.o \
55 lttng-context-vpid.o lttng-context-tid.o \
56 lttng-context-vtid.o lttng-context-ppid.o \
57 lttng-context-vppid.o lttng-context-cpu-id.o \
58 lttng-context-uid.o \
59 lttng-context-euid.o \
60 lttng-context-suid.o \
61 lttng-context-gid.o \
62 lttng-context-egid.o \
63 lttng-context-sgid.o \
64 lttng-context-vuid.o \
65 lttng-context-veuid.o \
66 lttng-context-vsuid.o \
67 lttng-context-vgid.o \
68 lttng-context-vegid.o \
69 lttng-context-vsgid.o \
70 lttng-context-interruptible.o \
71 lttng-context-need-reschedule.o \
437d5aa5 72 lttng-calibrate.o \
cfa6cc1d 73 lttng-context-hostname.o \
989f5401 74 lttng-context-callstack.o \
cfa6cc1d
MD
75 probes/lttng.o \
76 lttng-tracker-id.o \
80c2a69a
FD
77 lttng-bytecode.o lttng-bytecode-interpreter.o \
78 lttng-bytecode-specialize.o \
79 lttng-bytecode-validator.o \
cfa6cc1d
MD
80 probes/lttng-probe-user.o \
81 lttng-tp-mempool.o \
989f5401
FD
82 lttng-event-notifier-notification.o \
83 lttng-uuid.o
cfa6cc1d
MD
84
85lttng-wrapper-objs := wrapper/page_alloc.o \
86 wrapper/random.o \
87 wrapper/trace-clock.o \
88 wrapper/kallsyms.o \
89 wrapper/irqdesc.o \
90 wrapper/fdtable.o \
91 lttng-wrapper-impl.o
92
93ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),)
94 lttng-tracer-objs += lttng-syscalls.o
e42c4f49
FD
95 lttng-tracer-objs += lttng-syscalls-entry-table.o
96 lttng-tracer-objs += lttng-syscalls-entry-compat-table.o
97 lttng-tracer-objs += lttng-syscalls-exit-table.o
98 lttng-tracer-objs += lttng-syscalls-exit-compat-table.o
9857164a 99 lttng-tracer-objs += lttng-syscalls-enum.o
cfa6cc1d
MD
100endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
101
102ifneq ($(CONFIG_PERF_EVENTS),)
103 lttng-tracer-objs += lttng-context-perf-counters.o
104endif # CONFIG_PERF_EVENTS
105
106ifneq ($(CONFIG_PREEMPT_RT_FULL),)
107 lttng-tracer-objs += lttng-context-migratable.o
108 lttng-tracer-objs += lttng-context-preemptible.o
109endif # CONFIG_PREEMPT_RT_FULL
110
111ifneq ($(CONFIG_PREEMPT),)
112 lttng-tracer-objs += lttng-context-preemptible.o
113endif
114
115lttng-tracer-objs += $(shell \
116 if [ $(VERSION) -ge 4 \
117 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 \) ] ; then \
118 echo "lttng-tracepoint.o" ; fi;)
119
120lttng-tracer-objs += lttng-context-cgroup-ns.o
121
122ifneq ($(CONFIG_IPC_NS),)
123 lttng-tracer-objs += lttng-context-ipc-ns.o
124endif
125
126ifneq ($(wildcard $(mnt_ns_dep)),)
127 lttng-tracer-objs += lttng-context-mnt-ns.o
128endif
129
130ifneq ($(CONFIG_NET_NS),)
131 lttng-tracer-objs += lttng-context-net-ns.o
132endif
133
134ifneq ($(CONFIG_PID_NS),)
135 lttng-tracer-objs += lttng-context-pid-ns.o
136endif
137
138ifneq ($(CONFIG_USER_NS),)
139 lttng-tracer-objs += lttng-context-user-ns.o
140endif
141
142ifneq ($(CONFIG_UTS_NS),)
143 lttng-tracer-objs += lttng-context-uts-ns.o
144endif
145
876e2e92
MJ
146ifneq ($(CONFIG_TIME_NS),)
147 lttng-tracer-objs += lttng-context-time-ns.o
148endif
149
cfa6cc1d
MD
150obj-$(CONFIG_LTTNG) += lttng-statedump.o
151lttng-statedump-objs := lttng-statedump-impl.o
152
153obj-$(CONFIG_LTTNG) += probes/
154obj-$(CONFIG_LTTNG) += lib/
600da0c9 155obj-$(CONFIG_LTTNG) += tests/
This page took 0.036272 seconds and 5 git commands to generate.