X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=probes%2FKbuild;h=0b1e016f32b0822046674a25ba9d489508a23b95;hb=b90a7f303d6a661ad7b93cbdb249b741be305aed;hp=bf14c751c1a1fcf953f1c5433795d57c1f0d5ac0;hpb=12988eb9d3fb81d794411f02c4bd132647731325;p=lttng-modules.git diff --git a/probes/Kbuild b/probes/Kbuild index bf14c751..0b1e016f 100644 --- a/probes/Kbuild +++ b/probes/Kbuild @@ -1,6 +1,8 @@ +# SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) + TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. -include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds +include $(TOP_LTTNG_MODULES_DIR)/Kbuild.common ccflags-y += -I$(TOP_LTTNG_MODULES_DIR) @@ -12,6 +14,13 @@ obj-$(CONFIG_LTTNG) += lttng-probe-module.o obj-$(CONFIG_LTTNG) += lttng-probe-power.o obj-$(CONFIG_LTTNG) += lttng-probe-statedump.o +ifneq ($(CONFIG_NET_9P),) + obj-$(CONFIG_LTTNG) += $(shell \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 10 \) ] ; then \ + echo "lttng-probe-9p.o" ; fi;) +endif # CONFIG_NET_9P + i2c_dep = $(srctree)/include/trace/events/i2c.h ifneq ($(wildcard $(i2c_dep)),) obj-$(CONFIG_LTTNG) += lttng-probe-i2c.o @@ -97,13 +106,15 @@ ifneq ($(CONFIG_EXT3_FS),) ext3_dep = $(srctree)/fs/ext3/*.h ext3_dep_check = $(wildcard $(ext3_dep)) ext3 = $(shell \ - if [ $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - if [ \( $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) \) -a \ - -z "$(ext3_dep_check)" ] ; then \ - echo "warn" ; \ - exit ; \ + if [ $(VERSION) -lt 4 -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -lt 3 \) ] ; then \ + if [ $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ + if [ \( $(VERSION) -ge 4 -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) \) -a \ + -z "$(ext3_dep_check)" ] ; then \ + echo "warn" ; \ + exit ; \ + fi; \ + echo "lttng-probe-ext3.o" ; \ fi; \ - echo "lttng-probe-ext3.o" ; \ fi;) ifeq ($(ext3),warn) $(warning Files $(ext3_dep) not found. Probe "ext3" is disabled. Use full kernel source tree to enable it.) @@ -243,19 +254,33 @@ ifneq ($(CONFIG_KALLSYMS_ALL),) -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 36 \) ] ; then \ echo "lttng-probe-writeback.o" ; fi;) else - $(warning CONFIG_KALLSYMS_ALL is disabled, therefore probe "writeback" is disabled. Rebuild your kernel with this configuration option enabled in order to trace this subsystem.) + ifdef CONFIG_LOCALVERSION # Check if dot-config is included. + $(warning CONFIG_KALLSYMS_ALL is disabled, therefore probe "writeback" is disabled. Rebuild your kernel with this configuration option enabled in order to trace this subsystem.) + endif endif # CONFIG_KALLSYMS_ALL ifneq ($(CONFIG_KPROBES),) obj-$(CONFIG_LTTNG) += lttng-kprobes.o endif # CONFIG_KPROBES +ifneq ($(CONFIG_UPROBES),) + obj-$(CONFIG_LTTNG) += lttng-uprobes.o +endif # CONFIG_UPROBES + ifneq ($(CONFIG_KRETPROBES),) obj-$(CONFIG_LTTNG) += lttng-kretprobes.o endif # CONFIG_KRETPROBES ifneq ($(CONFIG_DYNAMIC_FTRACE),) - obj-$(CONFIG_LTTNG) += lttng-ftrace.o + ifeq ($(have_ftrace_header),yes) + obj-$(CONFIG_LTTNG) += lttng-ftrace.o + else + $(warning Files $(ftrace_dep) not found. Probe "ftrace" is disabled. Use full kernel source tree to enable it.) + endif endif # CONFIG_DYNAMIC_FTRACE +ifneq ($(CONFIG_PREEMPTIRQ_EVENTS),) + obj-$(CONFIG_LTTNG) += lttng-probe-preemptirq.o +endif # CONFIG_PREEMPTIRQ_EVENTS + # vim:syntax=make