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 \ | |
a82c63f1 | 22 | lttng-context-vppid.o lttng-calibrate.o \ |
0c956676 MD |
23 | lttng-context-hostname.o wrapper/random.o \ |
24 | probes/lttng.o | |
11b5a3c2 | 25 | |
c337ddc2 | 26 | obj-m += lttng-statedump.o |
361c023a MD |
27 | lttng-statedump-objs := lttng-statedump-impl.o wrapper/irqdesc.o \ |
28 | wrapper/fdtable.o | |
c337ddc2 | 29 | |
63728b02 | 30 | ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),) |
7b8ea3a5 | 31 | lttng-tracer-objs += lttng-syscalls.o probes/lttng-probe-user.o |
b4809588 | 32 | endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS |
259b6cb3 | 33 | |
c24a0d71 | 34 | ifneq ($(CONFIG_PERF_EVENTS),) |
a90917c3 | 35 | lttng-tracer-objs += $(shell \ |
1386746e | 36 | if [ $(VERSION) -ge 3 \ |
5ca7b8a3 | 37 | -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 \) ] ; then \ |
1d443b34 | 38 | echo "lttng-context-perf-counters.o" ; fi;) |
b4809588 | 39 | endif # CONFIG_PERF_EVENTS |
c24a0d71 | 40 | |
6d61b34d | 41 | obj-m += probes/ |
f3bc08c5 | 42 | obj-m += lib/ |
f3bc08c5 | 43 | |
b4809588 | 44 | endif # CONFIG_TRACEPOINTS |
1c8284eb | 45 | |
b4809588 | 46 | else # KERNELRELEASE |
1c8284eb MD |
47 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build |
48 | PWD := $(shell pwd) | |
2e6246b4 | 49 | CFLAGS = $(EXTCFLAGS) |
1c8284eb MD |
50 | |
51 | default: | |
52 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules | |
53 | ||
54 | modules_install: | |
55 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install | |
1c8284eb MD |
56 | |
57 | clean: | |
58 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean | |
59 | ||
23e6a44f FG |
60 | %.i: %.c |
61 | $(MAKE) -C $(KERNELDIR) M=$(PWD) $@ | |
b4809588 | 62 | endif # KERNELRELEASE |