Allow building on kernels < 2.6.33 (without perf event support)
[lttng-modules.git] / Makefile
CommitLineData
1c8284eb
MD
1#
2# Makefile for the LTT objects.
3#
4
5ifneq ($(KERNELRELEASE),)
11b5a3c2 6ifneq ($(CONFIG_TRACEPOINTS),)
1c8284eb 7
11b5a3c2
MD
8obj-m += ltt-ring-buffer-client-discard.o
9obj-m += ltt-ring-buffer-client-overwrite.o
881833e3 10obj-m += ltt-ring-buffer-metadata-client.o
1c8284eb
MD
11
12obj-m += ltt-relay.o
881833e3 13ltt-relay-objs := ltt-events.o ltt-debugfs-abi.o \
becb1a77 14 ltt-probes.o ltt-core.o ltt-context.o \
53f1f0ca 15 lttng-context-pid.o lttng-context-comm.o \
b64bc438
MD
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
11b5a3c2 20
c24a0d71 21ifneq ($(CONFIG_PERF_EVENTS),)
1d443b34
MD
22ltt-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;)
c24a0d71
MD
25endif
26
6d61b34d 27obj-m += probes/
f3bc08c5 28obj-m += lib/
f3bc08c5 29
1c8284eb
MD
30endif
31
32else
33 KERNELDIR ?= /lib/modules/$(shell uname -r)/build
34 PWD := $(shell pwd)
2e6246b4 35 CFLAGS = $(EXTCFLAGS)
1c8284eb
MD
36
37default:
38 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
39
40modules_install:
41 $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
42 /sbin/depmod -a
43
44clean:
45 $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
46
47endif
This page took 0.024964 seconds and 4 git commands to generate.