Move headers under include/
[lttng-modules.git] / Kbuild.common
... / ...
CommitLineData
1# SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only)
2
3# Work-around for distro-specific public modules ABI breakages.
4# Some distributions break the public module instrumentation ABI
5# compared to upstream stable kernels without providing other mean than
6# the kernel EXTRAVERSION to figure it out. Translate this information
7# into a define visible from the C preprocessor.
8
9DEB_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-debian-version.sh $(CURDIR))
10
11ifneq ($(DEB_API_VERSION), 0)
12 ccflags-y += -DDEBIAN_API_VERSION=$(DEB_API_VERSION)
13endif
14
15RHEL_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-rhel-version.sh $(CURDIR))
16
17ifneq ($(RHEL_API_VERSION), 0)
18 ccflags-y += -DRHEL_API_VERSION=$(RHEL_API_VERSION)
19endif
20
21SLE_API_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-sle-version.sh $(CURDIR))
22
23ifneq ($(SLE_API_VERSION), 0)
24 ccflags-y += -DSLE_API_VERSION=$(SLE_API_VERSION)
25endif
26
27FEDORA_REVISION_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/abi-fedora-version.sh $(CURDIR))
28
29ifneq ($(FEDORA_REVISION_VERSION), 0)
30 ccflags-y += -DFEDORA_REVISION_VERSION=$(FEDORA_REVISION_VERSION)
31endif
32
33RT_PATCH_VERSION:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/rt-patch-version.sh $(CURDIR))
34
35ifneq ($(RT_PATCH_VERSION), 0)
36 ccflags-y += -DRT_PATCH_VERSION=$(RT_PATCH_VERSION)
37endif
38
39EXTRA_VERSION_NAME:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/extra-version-name.sh $(TOP_LTTNG_MODULES_DIR))
40
41ifneq ($(EXTRA_VERSION_NAME), 0)
42 ccflags-y += -DLTTNG_EXTRA_VERSION_NAME='"$(EXTRA_VERSION_NAME)"'
43endif
44
45EXTRA_VERSION_GIT:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/extra-version-git.sh $(TOP_LTTNG_MODULES_DIR))
46
47ifneq ($(EXTRA_VERSION_GIT), 0)
48 ccflags-y += -DLTTNG_EXTRA_VERSION_GIT='"$(EXTRA_VERSION_GIT)"'
49endif
50
51EXTRA_VERSION_PATCHES:=$(shell $(TOP_LTTNG_MODULES_DIR)/scripts/extra-version-patches.sh $(TOP_LTTNG_MODULES_DIR))
52
53mnt_ns_dep = $(srctree)/fs/mount.h
54ifeq ($(wildcard $(mnt_ns_dep)),)
55 ccflags-y += -DLTTNG_MNT_NS_MISSING_HEADER
56endif
57
58# vim:syntax=make
This page took 0.023809 seconds and 4 git commands to generate.