Fix: build against out-of-tree kernel build
[deliverable/lttng-modules.git] / Makefile.ABI.workarounds
index f00340c977a2e6398002f81451cdcec14b7554c4..d30aeaf2939d1922e076e7d7a9a616301f499966 100644 (file)
@@ -4,8 +4,14 @@
 # the kernel EXTRAVERSION to figure it out. Translate this information
 # into a define visible from the C preprocessor.
 
-DEB_API_VERSION=$(shell $(KBUILD_EXTMOD)/abi-debian-version.sh $(KERNELDIR))
+DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh $(CURDIR))
 
 ifneq ($(DEB_API_VERSION), 0)
-ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION)
+  ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION)
+endif
+
+RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR))
+
+ifneq ($(RT_PATCH_VERSION), 0)
+  ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION)
 endif
This page took 0.02509 seconds and 5 git commands to generate.