| 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 |
| 15 | |
| 16 | obj-m += probes/ |
| 17 | |
| 18 | # Use externally packaged lib ring buffer if missing in kernel |
| 19 | ifneq ($(CONFIG_LIB_RING_BUFFER),) |
| 20 | else |
| 21 | obj-m += lib/ |
| 22 | endif |
| 23 | |
| 24 | endif |
| 25 | |
| 26 | else |
| 27 | KERNELDIR ?= /lib/modules/$(shell uname -r)/build |
| 28 | PWD := $(shell pwd) |
| 29 | CFLAGS = $(EXTCFLAGS) |
| 30 | |
| 31 | default: |
| 32 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules |
| 33 | |
| 34 | modules_install: |
| 35 | $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install |
| 36 | /sbin/depmod -a |
| 37 | |
| 38 | clean: |
| 39 | $(MAKE) -C $(KERNELDIR) M=$(PWD) clean |
| 40 | |
| 41 | endif |