5 LTTng-UST ships with `lttng-gen-tp`, a handy command line utility for
6 generating most of the stuff discussed above. It takes a _template file_,
7 with a name usually ending with the `.tp` extension, containing only
8 tracepoint definitions, and outputs a tracepoint provider (either a C
9 source file or a precompiled object file) with its header file.
11 `lttng-gen-tp` should suffice in [static linking](#doc-static-linking)
12 situations. When using it, write a template file containing a list of
13 `TRACEPOINT_EVENT()` macro calls. The tool finds the provider names
14 used and generate the appropriate files which are going to look a lot
15 like `tp.h` and `tp.c` above.
17 Just call `lttng-gen-tp` like this:
20 lttng-gen-tp my-template.tp
23 `my-template.c`, `my-template.o` and `my-template.h` are created
24 in the same directory.
26 You may specify custom C flags passed to the compiler invoked by
27 `lttng-gen-tp` using the `CFLAGS` environment variable:
30 CFLAGS=-I/custom/include/path lttng-gen-tp my-template.tp
33 For more information on `lttng-gen-tp`, see
34 <a href="/man/1/lttng-gen-tp/v2.7" class="ext">its man page</a>.