Commit | Line | Data |
---|---|---|
6d61b34d MD |
1 | # |
2 | # Makefile for the LTT probes. | |
df4b4094 | 3 | # Only build from the package top-level directory. Never use with make directly. |
6d61b34d MD |
4 | |
5 | ifneq ($(KERNELRELEASE),) | |
6 | ifneq ($(CONFIG_TRACEPOINTS),) | |
7 | ||
8 | ccflags-y += -I$(PWD)/probes | |
40652b65 | 9 | obj-m += lttng-types.o |
6d61b34d | 10 | |
cd4bd11f MD |
11 | obj-m += lttng-probe-lttng.o |
12 | ||
6db3d13b | 13 | obj-m += lttng-probe-sched.o |
0d1d4002 | 14 | obj-m += lttng-probe-irq.o |
8c468a9b | 15 | |
c337ddc2 MD |
16 | obj-m += lttng-probe-statedump.o |
17 | ||
056f5922 MD |
18 | ifneq ($(CONFIG_KVM),) |
19 | obj-m += lttng-probe-kvm.o | |
20 | endif | |
21 | ||
c9604bd3 MD |
22 | ifneq ($(CONFIG_BLOCK),) |
23 | ifneq ($(CONFIG_EVENT_TRACING),) # need blk_cmd_buf_len | |
2d3767da MD |
24 | obj-m += $(shell \ |
25 | if [ $(VERSION) -ge 3 \ | |
26 | -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 38 \) ] ; then \ | |
27 | echo "lttng-probe-block.o" ; fi;) | |
c9604bd3 MD |
28 | endif |
29 | endif | |
30 | ||
acd614cc | 31 | ifneq ($(CONFIG_KPROBES),) |
d6d808f3 | 32 | obj-m += lttng-kprobes.o |
acd614cc | 33 | endif |
d6d808f3 | 34 | |
7371f44c MD |
35 | |
36 | ifneq ($(CONFIG_KRETPROBES),) | |
37 | obj-m += lttng-kretprobes.o | |
38 | endif | |
39 | ||
e0a7a7c4 MD |
40 | ifneq ($(CONFIG_DYNAMIC_FTRACE),) |
41 | obj-m += lttng-ftrace.o | |
42 | endif | |
43 | ||
6d61b34d MD |
44 | endif |
45 | ||
46 | else | |
47 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build | |
48 | PWD := $(shell pwd) | |
49 | CFLAGS = $(EXTCFLAGS) | |
50 | ||
51 | default: | |
52 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules | |
53 | ||
54 | modules_install: | |
55 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install | |
56 | /sbin/depmod -a | |
57 | ||
58 | clean: | |
59 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean | |
60 | ||
61 | endif |