From: Mathieu Desnoyers Date: Thu, 16 Apr 2015 19:49:36 +0000 (-0400) Subject: Fix: Support 4.x kernel versions in Makefile X-Git-Tag: v2.6.1~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=821a88704788e063a532c2683d598aaf5e032d24;p=lttng-modules.git Fix: Support 4.x kernel versions in Makefile Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index eeffdfe9..871ff1a7 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,8 @@ lttng-tracer-objs += $(shell \ endif # CONFIG_PERF_EVENTS lttng-tracer-objs += $(shell \ - if [ $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 -a $(SUBLEVEL) -ge 0 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 15 -a $(SUBLEVEL) -ge 0 \) ] ; then \ echo "lttng-tracepoint.o" ; fi;) obj-m += probes/ diff --git a/probes/Makefile b/probes/Makefile index 8e4ceb7b..081136a2 100644 --- a/probes/Makefile +++ b/probes/Makefile @@ -169,37 +169,43 @@ CFLAGS_lttng-probe-printk.o += -Wframe-larger-than=2200 endif obj-m += $(shell \ - if [ \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 6 \) \ -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 5 -a $(SUBLEVEL) -ge 2 \) \ -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 4 -a $(SUBLEVEL) -ge 9 \) \ -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -eq 0 -a $(SUBLEVEL) -ge 41 \) ] ; then \ echo "lttng-probe-random.o" ; fi;) obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ echo "lttng-probe-rcu.o" ; fi;) ifneq ($(CONFIG_REGMAP),) obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 ] ; then \ + if [ $(VERSION) -ge 4 \ + \( -o $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ echo "lttng-probe-regmap.o" ; fi;) endif ifneq ($(CONFIG_PM_RUNTIME),) obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 2 \) ] ; then \ echo "lttng-probe-rpm.o" ; fi;) endif ifneq ($(CONFIG_SUNRPC),) 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-sunrpc.o" ; fi;) endif ifneq ($(CONFIG_VIDEO_V4L2),) obj-m += $(shell \ - if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 14 ] ; then \ + if [ $(VERSION) -ge 4 \ + -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 14 \) ] ; then \ echo "lttng-probe-v4l2.o" ; fi;) endif