SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / doc / examples / trigger-on-event / performance / Makefile
CommitLineData
2463b787
JR
1# Copyright (C) 2020 Jérémie Galarneau <jeremie.galarneau@efficios.com>
2#
3# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
4# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
5#
6# Permission is hereby granted to use or copy this program for any
7# purpose, provided the above notices are retained on all copies.
8# Permission to modify the code and to distribute modified code is
9# granted, provided the above notices are retained, and a notice that
10# the code was modified is included with the above copyright notice.
11#
12# This Makefile is not using automake so that users may see how to build
13# a program with tracepoint provider probes compiled as static libraries.
14#
15# This makefile is purposefully kept simple to support GNU and BSD make.
16
17LOCAL_CPPFLAGS += -I.
18LIBS_INSTRUMENTED_APP = -ldl -llttng-ust
19LIBS_NOTIFICATION_CLIENT = -ldl -llttng-ctl
20LIBS_PERFORMANCE_CLIENT = -ldl -llttng-ust -llttng-ctl
21AM_V_P := :
22AR ?= ar
23
24all: producer consumer
25
26performance.o: performance.c performance.h
27 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
28 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
29 $(CFLAGS) -c -o $@ $<
30
31performance.a: performance.o
32 @if $(AM_V_P); then set -x; else echo " AR $@"; fi; \
33 $(AR) -rc $@ performance.o
34
35producer.o: producer.c
36 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
37 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
38 $(CFLAGS) -c -o $@ $<
39
40consumer.o: consumer.c
41 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
42 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
43 $(CFLAGS) -c -o $@ $<
44
45producer: producer.o performance.a
46 @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \
47 $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
48 $(CFLAGS) producer.o performance.a $(LIBS_PERFORMANCE_CLIENT)
49
50consumer: consumer.o performance.a
51 @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \
52 $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
53 $(CFLAGS) consumer.o performance.a $(LIBS_PERFORMANCE_CLIENT)
54
55.PHONY: clean
56clean:
57 rm -f *.o *.a producer consumer
This page took 0.025558 seconds and 5 git commands to generate.