Commit | Line | Data |
---|---|---|
1c8284eb MD |
1 | # |
2 | # Makefile for the LTT objects. | |
3 | # | |
4 | ||
5 | ifneq ($(KERNELRELEASE),) | |
11b5a3c2 | 6 | ifneq ($(CONFIG_TRACEPOINTS),) |
1c8284eb | 7 | |
a90917c3 MD |
8 | obj-m += lttng-ring-buffer-client-discard.o |
9 | obj-m += lttng-ring-buffer-client-overwrite.o | |
10 | obj-m += lttng-ring-buffer-metadata-client.o | |
11 | obj-m += lttng-ring-buffer-client-mmap-discard.o | |
12 | obj-m += lttng-ring-buffer-client-mmap-overwrite.o | |
13 | obj-m += lttng-ring-buffer-metadata-mmap-client.o | |
14 | ||
15 | obj-m += lttng-tracer.o | |
16 | lttng-tracer-objs := lttng-events.o lttng-abi.o \ | |
17 | lttng-probes.o lttng-context.o \ | |
c26fddc2 | 18 | lttng-context-pid.o lttng-context-procname.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 | |
63728b02 | 24 | ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),) |
a90917c3 | 25 | lttng-tracer-objs += lttng-syscalls.o |
63728b02 | 26 | endif |
259b6cb3 | 27 | |
c24a0d71 | 28 | ifneq ($(CONFIG_PERF_EVENTS),) |
a90917c3 | 29 | lttng-tracer-objs += $(shell \ |
1386746e MD |
30 | if [ $(VERSION) -ge 3 \ |
31 | -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ | |
1d443b34 | 32 | echo "lttng-context-perf-counters.o" ; fi;) |
c24a0d71 MD |
33 | endif |
34 | ||
6d61b34d | 35 | obj-m += probes/ |
f3bc08c5 | 36 | obj-m += lib/ |
f3bc08c5 | 37 | |
1c8284eb MD |
38 | endif |
39 | ||
40 | else | |
41 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build | |
42 | PWD := $(shell pwd) | |
2e6246b4 | 43 | CFLAGS = $(EXTCFLAGS) |
1c8284eb MD |
44 | |
45 | default: | |
46 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules | |
47 | ||
48 | modules_install: | |
49 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install | |
1c8284eb MD |
50 | |
51 | clean: | |
52 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean | |
53 | ||
54 | endif |