SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / doc / examples / trigger-on-event / Makefile
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
17 LOCAL_CPPFLAGS += -I.
18 LIBS_INSTRUMENTED_APP = -ldl -llttng-ust
19 LIBS_NOTIFICATION_CLIENT = -ldl -llttng-ctl
20 AM_V_P := :
21 AR ?= ar
22
23 all: instrumented-app notification-client
24
25 tracepoint-trigger-example.o: tracepoint-trigger-example.c tracepoint-trigger-example.h
26 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
27 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
28 $(CFLAGS) -c -o $@ $<
29
30 tracepoint-trigger-example.a: tracepoint-trigger-example.o
31 @if $(AM_V_P); then set -x; else echo " AR $@"; fi; \
32 $(AR) -rc $@ tracepoint-trigger-example.o
33
34 instrumented-app.o: instrumented-app.c
35 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
36 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
37 $(CFLAGS) -c -o $@ $<
38
39 instrumented-app: instrumented-app.o tracepoint-trigger-example.a
40 @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \
41 $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
42 $(CFLAGS) instrumented-app.o tracepoint-trigger-example.a $(LIBS_INSTRUMENTED_APP)
43
44 notification-client.o: notification-client.c
45 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
46 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
47 $(CFLAGS) -c -o $@ $<
48
49 notification-client: notification-client.o
50 @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \
51 $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
52 $(CFLAGS) notification-client.o tracepoint-trigger-example.a $(LIBS_NOTIFICATION_CLIENT)
53
54 .PHONY: clean
55 clean:
56 rm -f *.o *.a instrumented-app notification-client
This page took 0.030839 seconds and 5 git commands to generate.