| 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 | wrapper/poll.o |
| 18 | |
| 19 | ifneq ($(CONFIG_PERF_EVENTS),) |
| 20 | ltt-relay-objs += lttng-context-perf-counters.o |
| 21 | endif |
| 22 | |
| 23 | obj-m += probes/ |
| 24 | obj-m += lib/ |
| 25 | |
| 26 | endif |
| 27 | |
| 28 | else |
| 29 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build |
| 30 | PWD := $(shell pwd) |
| 31 | CFLAGS = $(EXTCFLAGS) |
| 32 | |
| 33 | default: |
| 34 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules |
| 35 | |
| 36 | modules_install: |
| 37 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install |
| 38 | /sbin/depmod -a |
| 39 | |
| 40 | clean: |
| 41 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean |
| 42 | |
| 43 | endif |