xref: /OK3568_Linux_fs/kernel/samples/trace_events/Makefile (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only
2*4882a593Smuzhiyun# builds the trace events example kernel modules;
3*4882a593Smuzhiyun# then to use one (as root):  insmod <module_name.ko>
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun# If you include a trace header outside of include/trace/events
6*4882a593Smuzhiyun# then the file that does the #define CREATE_TRACE_POINTS must
7*4882a593Smuzhiyun# have that tracer file in its main search path. This is because
8*4882a593Smuzhiyun# define_trace.h will include it, and must be able to find it from
9*4882a593Smuzhiyun# the include/trace directory.
10*4882a593Smuzhiyun#
11*4882a593Smuzhiyun# Here trace-events-sample.c does the CREATE_TRACE_POINTS.
12*4882a593Smuzhiyun#
13*4882a593SmuzhiyunCFLAGS_trace-events-sample.o := -I$(src)
14*4882a593Smuzhiyun
15*4882a593Smuzhiyunobj-$(CONFIG_SAMPLE_TRACE_EVENTS) += trace-events-sample.o
16