X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=probes%2FMakefile;h=cc4c352168dcef0f97f57a0a6963d65401770a5a;hb=1150bcb59992634f385fe65cd83bce4a8003f094;hp=3272b9f82f0ca340c2df5377c27a500c82ed068c;hpb=72db1028200af12608d31140a1e68839eaa4efd1;p=lttng-modules.git diff --git a/probes/Makefile b/probes/Makefile index 3272b9f8..cc4c3521 100644 --- a/probes/Makefile +++ b/probes/Makefile @@ -5,9 +5,10 @@ ifneq ($(KERNELRELEASE),) ifneq ($(CONFIG_TRACEPOINTS),) -KERNELDIR=${LTTNG_KERNELDIR} +KERNELDIR = ${LTTNG_KERNELDIR} +MAKEFILEDIR = $(shell dirname $(lastword $(MAKEFILE_LIST))) -include $(KBUILD_EXTMOD)/Makefile.ABI.workarounds +include $(MAKEFILEDIR)/../Makefile.ABI.workarounds ccflags-y += -I$(PWD)/probes obj-m += lttng-types.o @@ -24,6 +25,8 @@ obj-m += lttng-probe-statedump.o ifneq ($(CONFIG_KVM),) obj-m += lttng-probe-kvm.o ifneq ($(CONFIG_X86),) +kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h +ifneq ($(wildcard $(kvm_dep_lapic)),) kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h ifneq ($(wildcard $(kvm_dep)),) CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm @@ -39,6 +42,9 @@ obj-m += $(shell \ else $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.) endif +else +$(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.) +endif endif endif @@ -61,10 +67,12 @@ obj-m += $(shell \ -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -ge 6 -a $(SUBLEVEL) -ge 37 \) ] ; then \ echo "lttng-probe-net.o" ; fi;) obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ echo "lttng-probe-sock.o" ; fi;) obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ echo "lttng-probe-udp.o" ; fi;) endif @@ -79,8 +87,8 @@ ifneq ($(CONFIG_EXT3_FS),) ext3_dep = $(srctree)/fs/ext3/*.h ext3_dep_check = $(wildcard $(ext3_dep)) ext3 = $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 -a \ + 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 ; \ @@ -106,7 +114,8 @@ endif ifneq ($(CONFIG_JBD),) obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ echo "lttng-probe-jbd.o" ; fi;) endif @@ -172,7 +181,8 @@ obj-m += $(ext4) endif obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 4 \) ] ; then \ echo "lttng-probe-printk.o" ; fi;) ifneq ($(CONFIG_FRAME_WARN),0) CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200 @@ -192,29 +202,11 @@ obj-m += $(shell \ echo "lttng-probe-rcu.o" ; fi;) ifneq ($(CONFIG_REGMAP),) -regmap_dep_3_x = $(srctree)/include/trace/events/regmap.h -regmap_dep_4_0 = $(srctree)/drivers/base/regmap/internal.h regmap_dep_4_1 = $(srctree)/drivers/base/regmap/trace.h - ifneq ($(wildcard $(regmap_dep_4_1)),) -obj-m += $(shell \ - if [ $(VERSION) -ge 5 \ - -o \( $(VERSION) -eq 4 -a $(PATCHLEVEL) -ge 1 \) ] ; then \ - echo "lttng-probe-regmap.o" ; fi;) -else -ifneq ($(wildcard $(regmap_dep_4_0)),) -obj-m += $(shell \ - if [ $(VERSION) -eq 4 -a $(PATCHLEVEL) -eq 0 ] ; then \ - echo "lttng-probe-regmap.o" ; fi;) +obj-m += lttng-probe-regmap.o else -ifneq ($(wildcard $(regmap_dep_3_x)),) -obj-m += $(shell \ - if [ $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 ] ; then \ - echo "lttng-probe-regmap.o" ; fi;) -else -$(warning Either of files $(regmap_dep_4_1), $(regmap_dep_4_0), or $(regmap_dep_3_x) not found. Probe "regmap" is disabled. Use full kernel source tree to enable it.) -endif -endif +$(warning File $(regmap_dep_4_1) not found. Probe "regmap" is disabled. Need Linux 4.1+ kernel source tree to enable it.) endif endif