Commit | Line | Data |
---|---|---|
1c8284eb MD |
1 | # |
2 | # Makefile for the LTT objects. | |
3 | # | |
4 | ||
5 | ifneq ($(KERNELRELEASE),) | |
11b5a3c2 | 6 | ifneq ($(CONFIG_TRACEPOINTS),) |
1c8284eb | 7 | |
11b5a3c2 MD |
8 | obj-m += ltt-ring-buffer-client-discard.o |
9 | obj-m += ltt-ring-buffer-client-overwrite.o | |
881833e3 | 10 | obj-m += ltt-ring-buffer-metadata-client.o |
2db1399a JD |
11 | obj-m += ltt-ring-buffer-client-mmap-discard.o |
12 | obj-m += ltt-ring-buffer-client-mmap-overwrite.o | |
13 | obj-m += ltt-ring-buffer-metadata-mmap-client.o | |
1c8284eb MD |
14 | |
15 | obj-m += ltt-relay.o | |
881833e3 | 16 | ltt-relay-objs := ltt-events.o ltt-debugfs-abi.o \ |
0f9c9909 | 17 | ltt-probes.o ltt-context.o \ |
53f1f0ca | 18 | lttng-context-pid.o lttng-context-comm.o \ |
b64bc438 MD |
19 | lttng-context-prio.o lttng-context-nice.o \ |
20 | lttng-context-vpid.o lttng-context-tid.o \ | |
21 | lttng-context-vtid.o lttng-context-ppid.o \ | |
57105fc2 | 22 | lttng-context-vppid.o lttng-calibrate.o |
11b5a3c2 | 23 | |
c24a0d71 | 24 | ifneq ($(CONFIG_PERF_EVENTS),) |
1d443b34 | 25 | ltt-relay-objs += $(shell \ |
1386746e MD |
26 | if [ $(VERSION) -ge 3 \ |
27 | -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ | |
1d443b34 | 28 | echo "lttng-context-perf-counters.o" ; fi;) |
c24a0d71 MD |
29 | endif |
30 | ||
6d61b34d | 31 | obj-m += probes/ |
f3bc08c5 | 32 | obj-m += lib/ |
f3bc08c5 | 33 | |
1c8284eb MD |
34 | endif |
35 | ||
36 | else | |
37 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build | |
38 | PWD := $(shell pwd) | |
2e6246b4 | 39 | CFLAGS = $(EXTCFLAGS) |
1c8284eb MD |
40 | |
41 | default: | |
42 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules | |
43 | ||
44 | modules_install: | |
45 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install | |
46 | /sbin/depmod -a | |
47 | ||
48 | clean: | |
49 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean | |
50 | ||
51 | endif |