Move to kernel style SPDX license identifiers
[lttng-ust.git] / doc / examples / easy-ust / Makefile
CommitLineData
c0c0989a 1# SPDX-License-Identifier: MIT
4807c6de 2#
c0c0989a
MJ
3# Copyright (C) 2011-2012 Matthew Khouzam <matthew.khouzam@ericsson.com>
4# Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
16c96fc0 5#
a106a9f8
JG
6# This makefile is not using automake so that users can see how to build
7# a program with a statically embedded tracepoint provider probe.
4807c6de 8# the "html" target helps for documentation (req. code2html)
16c96fc0
MD
9#
10# This makefile is purposefully kept simple to support GNU and BSD make.
4807c6de 11
c6c454ab
MD
12LIBS = -ldl -llttng-ust # On Linux
13#LIBS = -lc -llttng-ust # On BSD
2e390600 14LOCAL_CPPFLAGS += -I.
dc5af9e3 15AM_V_P := :
a106a9f8 16
4807c6de
MD
17all: sample
18
19sample: sample.o tp.o
dc5af9e3
MJ
20 @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \
21 $(CC) -o $@ $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
afd20a56 22 sample.o tp.o $(LIBS)
4807c6de
MD
23
24sample.o: sample.c sample_component_provider.h
dc5af9e3
MJ
25 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
26 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
e1c62734 27 $(CFLAGS) -c -o $@ $<
4807c6de
MD
28
29tp.o: tp.c sample_component_provider.h
dc5af9e3
MJ
30 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
31 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
e1c62734 32 $(CFLAGS) -c -o $@ $<
4807c6de
MD
33
34html: sample_component_provider.html sample.html tp.html
35
a106a9f8 36%.html: %.c
4807c6de
MD
37 code2html -lc $< $@
38
39%.html : %.h
40 code2html -lc $< $@
41
42.PHONY: clean
43clean:
a106a9f8 44 rm -f *.html
4807c6de 45 rm -f *.o sample
This page took 0.028587 seconds and 4 git commands to generate.