KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
+# Experimental bitwise enum defaults to disabled.
+CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM ?= n
+
+# Emulate Kconfig behavior of setting defines for config options.
+LKCPPFLAGS = $(KCPPFLAGS)
+ifeq ($(CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM),y)
+LKCPPFLAGS += -DCONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM=y
+endif
+
default: modules
modules:
- $(MAKE) -C $(KERNELDIR) M=$(PWD)/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules
+ $(MAKE) -C $(KERNELDIR) M=$(PWD)/src \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ modules
modules_install:
- $(MAKE) -C $(KERNELDIR) M=$(PWD)/src CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules_install
+ $(MAKE) -C $(KERNELDIR) M=$(PWD)/src \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ modules_install
clean:
$(MAKE) -C $(KERNELDIR) M=$(PWD)/src clean
# The following targets are used for development and debugging. They are not
# part of the build system.
%.i: %.c
- $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m $@
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ $@
%.o: %.c
- $(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m $@
+ $(MAKE) -C $(KERNELDIR) M=$(PWD) \
+ CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m \
+ KCPPFLAGS='$(LKCPPFLAGS)' \
+ $@
endif # KERNELRELEASE
- `CONFIG_KALLSYMS_ALL`: state dump of mapping between block device
number and name
+### LTTng specific kernel config options
+
+The following kernel configuration options are provided by LTTng:
+
+ - `CONFIG_LTTNG`: Build LTTng (Defaults to 'm').
+ - `CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM`: Enable the experimental bitwise
+ enumerations (Defaults to 'n'). This can be enabled by building with:
+
+ make CONFIG_LTTNG_EXPERIMENTAL_BITWISE_ENUM=y
+
+ - `CONFIG_LTTNG_CLOCK_PLUGIN_TEST`: Build the test clock plugin (Defaults to
+ 'm'). This plugin overrides the trace clock and should always be built as a
+ module for testing.
+
+
Customization/Extension
-----------------------
If unsure, say N.
+config LTTNG_EXPERIMENTAL_BITWISE_ENUM
+ bool "LTTng experimental bitwise enum support"
+ default n
+ depends on LTTNG
+ help
+ Enable experimental bitwise enumerations. The traces produced with
+ this option enabled will generate warnings when read by trace
+ viewers with default options.
+
+ If unsure, say N.
+
source "lttng/src/tests/Kconfig"