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.7.0-rc1~58 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=725528de34601e8155a7d5153a9bd4a5b8e7d9de;p=lttng-modules.git Fix: Support 4.x kernel versions in Makefile Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index 812ba9ba..283cc46a 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,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