Tests: Fix abi conflict test when building with clang
[lttng-ust.git] / doc / examples / easy-ust / Makefile
... / ...
CommitLineData
1# SPDX-License-Identifier: MIT
2#
3# Copyright (C) 2011-2012 Matthew Khouzam <matthew.khouzam@ericsson.com>
4# Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5#
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.
8# the "html" target helps for documentation (req. code2html)
9#
10# This makefile is purposefully kept simple to support GNU and BSD make.
11
12LIBS = -ldl -llttng-ust # On Linux
13#LIBS = -lc -llttng-ust # On BSD
14LOCAL_CPPFLAGS += -I.
15AM_V_P := :
16
17all: sample
18
19sample: sample.o tp.o
20 @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \
21 $(CC) -o $@ $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
22 sample.o tp.o $(LIBS)
23
24sample.o: sample.c sample_component_provider.h
25 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
26 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
27 $(CFLAGS) -c -o $@ $<
28
29tp.o: tp.c sample_component_provider.h
30 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
31 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
32 $(CFLAGS) -c -o $@ $<
33
34html: sample_component_provider.html sample.html tp.html
35
36%.html: %.c
37 code2html -lc $< $@
38
39%.html : %.h
40 code2html -lc $< $@
41
42.PHONY: clean
43clean:
44 rm -f *.html
45 rm -f *.o sample
This page took 0.024053 seconds and 5 git commands to generate.