Allow building on kernels < 2.6.33 (without perf event support)
[lttng-modules.git] / Makefile
1 #
2 # Makefile for the LTT objects.
3 #
4
5 ifneq ($(KERNELRELEASE),)
6 ifneq ($(CONFIG_TRACEPOINTS),)
7
8 obj-m += ltt-ring-buffer-client-discard.o
9 obj-m += ltt-ring-buffer-client-overwrite.o
10 obj-m += ltt-ring-buffer-metadata-client.o
11
12 obj-m += ltt-relay.o
13 ltt-relay-objs := ltt-events.o ltt-debugfs-abi.o \
14 ltt-probes.o ltt-core.o ltt-context.o \
15 lttng-context-pid.o lttng-context-comm.o \
16 lttng-context-prio.o lttng-context-nice.o \
17 lttng-context-vpid.o lttng-context-tid.o \
18 lttng-context-vtid.o lttng-context-ppid.o \
19 lttng-context-vppid.o
20
21 ifneq ($(CONFIG_PERF_EVENTS),)
22 ltt-relay-objs += $(shell \
23 if [ $(VERSION) -ge 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 33 ] ; then \
24 echo "lttng-context-perf-counters.o" ; fi;)
25 endif
26
27 obj-m += probes/
28 obj-m += lib/
29
30 endif
31
32 else
33 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
34 PWD := $(shell pwd)
35 CFLAGS = $(EXTCFLAGS)
36
37 default:
38 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
39
40 modules_install:
41 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
42 /sbin/depmod -a
43
44 clean:
45 $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
46
47 endif
This page took 0.029987 seconds and 5 git commands to generate.