Stop build if CONFIG_TRACEPOINTS is not set
[lttng-modules.git] / Makefile
CommitLineData
1c8284eb
MD
1#
2# Makefile for the LTT objects.
3#
4
5ifneq ($(KERNELRELEASE),)
699f9673
SV
6
7ifeq ($(CONFIG_TRACEPOINTS),)
8
9$(error You need to enable CONFIG_TRACEPOINTS in kernel!)
10
11endif #CONFIG_TRACEPOINTS
12
11b5a3c2 13ifneq ($(CONFIG_TRACEPOINTS),)
1c8284eb 14
a90917c3
MD
15obj-m += lttng-ring-buffer-client-discard.o
16obj-m += lttng-ring-buffer-client-overwrite.o
17obj-m += lttng-ring-buffer-metadata-client.o
18obj-m += lttng-ring-buffer-client-mmap-discard.o
19obj-m += lttng-ring-buffer-client-mmap-overwrite.o
20obj-m += lttng-ring-buffer-metadata-mmap-client.o
21
22obj-m += lttng-tracer.o
23lttng-tracer-objs := lttng-events.o lttng-abi.o \
24 lttng-probes.o lttng-context.o \
c26fddc2 25 lttng-context-pid.o lttng-context-procname.o \
b64bc438
MD
26 lttng-context-prio.o lttng-context-nice.o \
27 lttng-context-vpid.o lttng-context-tid.o \
28 lttng-context-vtid.o lttng-context-ppid.o \
a82c63f1 29 lttng-context-vppid.o lttng-calibrate.o \
975da2c0 30 lttng-context-hostname.o wrapper/random.o
11b5a3c2 31
c337ddc2 32obj-m += lttng-statedump.o
361c023a
MD
33lttng-statedump-objs := lttng-statedump-impl.o wrapper/irqdesc.o \
34 wrapper/fdtable.o
c337ddc2 35
63728b02 36ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),)
7b8ea3a5 37lttng-tracer-objs += lttng-syscalls.o probes/lttng-probe-user.o
b4809588 38endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
259b6cb3 39
c24a0d71 40ifneq ($(CONFIG_PERF_EVENTS),)
a90917c3 41lttng-tracer-objs += $(shell \
1386746e 42 if [ $(VERSION) -ge 3 \
3a523f5b 43 -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 34 \) ] ; then \
1d443b34 44 echo "lttng-context-perf-counters.o" ; fi;)
b4809588 45endif # CONFIG_PERF_EVENTS
c24a0d71 46
6d61b34d 47obj-m += probes/
f3bc08c5 48obj-m += lib/
f3bc08c5 49
b4809588 50endif # CONFIG_TRACEPOINTS
1c8284eb 51
b4809588 52else # KERNELRELEASE
1c8284eb
MD
53 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
54 PWD := $(shell pwd)
2e6246b4 55 CFLAGS = $(EXTCFLAGS)
1c8284eb
MD
56
57default:
58 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
59
60modules_install:
61 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
1c8284eb
MD
62
63clean:
64 $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
65
23e6a44f
FG
66%.i: %.c
67 $(MAKE) -C $(KERNELDIR) M=$(PWD) $@
b4809588 68endif # KERNELRELEASE
This page took 0.028291 seconds and 4 git commands to generate.