| 1 | # Work-around for distro-specific public modules ABI breakages. |
| 2 | # Some distributions break the public module instrumentation ABI |
| 3 | # compared to upstream stable kernels without providing other mean than |
| 4 | # the kernel EXTRAVERSION to figure it out. Translate this information |
| 5 | # into a define visible from the C preprocessor. |
| 6 | |
| 7 | DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-debian-version.sh $(CURDIR)) |
| 8 | |
| 9 | ifneq ($(DEB_API_VERSION), 0) |
| 10 | ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION) |
| 11 | endif |
| 12 | |
| 13 | RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-rhel-version.sh $(CURDIR)) |
| 14 | |
| 15 | ifneq ($(RHEL_API_VERSION), 0) |
| 16 | ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION) |
| 17 | endif |
| 18 | |
| 19 | SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/abi-sle-version.sh $(CURDIR)) |
| 20 | |
| 21 | ifneq ($(SLE_API_VERSION), 0) |
| 22 | ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION) |
| 23 | endif |
| 24 | |
| 25 | RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/rt-patch-version.sh $(CURDIR)) |
| 26 | |
| 27 | ifneq ($(RT_PATCH_VERSION), 0) |
| 28 | ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION) |
| 29 | endif |