SoW-2020-0002: Trace Hit Counters: trigger error reporting integration
[lttng-tools.git] / doc / examples / trigger-on-event / performance / Makefile
diff --git a/doc/examples/trigger-on-event/performance/Makefile b/doc/examples/trigger-on-event/performance/Makefile
new file mode 100644 (file)
index 0000000..751548b
--- /dev/null
@@ -0,0 +1,57 @@
+# Copyright (C) 2020  Jérémie Galarneau <jeremie.galarneau@efficios.com>
+#
+# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
+# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
+#
+# Permission is hereby granted to use or copy this program for any
+# purpose, provided the above notices are retained on all copies.
+# Permission to modify the code and to distribute modified code is
+# granted, provided the above notices are retained, and a notice that
+# the code was modified is included with the above copyright notice.
+#
+# This Makefile is not using automake so that users may see how to build
+# a program with tracepoint provider probes compiled as static libraries.
+#
+# This makefile is purposefully kept simple to support GNU and BSD make.
+
+LOCAL_CPPFLAGS += -I.
+LIBS_INSTRUMENTED_APP = -ldl -llttng-ust
+LIBS_NOTIFICATION_CLIENT = -ldl -llttng-ctl
+LIBS_PERFORMANCE_CLIENT = -ldl -llttng-ust -llttng-ctl
+AM_V_P := :
+AR ?= ar
+
+all: producer consumer
+
+performance.o: performance.c performance.h
+       @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
+               $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
+
+performance.a: performance.o
+       @if $(AM_V_P); then set -x; else echo "  AR       $@"; fi; \
+               $(AR) -rc $@ performance.o
+
+producer.o: producer.c
+       @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
+               $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
+
+consumer.o: consumer.c
+       @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
+               $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
+
+producer: producer.o performance.a
+       @if $(AM_V_P); then set -x; else echo "  CCLD     $@"; fi; \
+               $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+               $(CFLAGS) producer.o performance.a $(LIBS_PERFORMANCE_CLIENT)
+
+consumer: consumer.o performance.a
+       @if $(AM_V_P); then set -x; else echo "  CCLD     $@"; fi; \
+               $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+               $(CFLAGS) consumer.o performance.a $(LIBS_PERFORMANCE_CLIENT)
+
+.PHONY: clean
+clean:
+       rm -f *.o *.a producer consumer
This page took 0.023726 seconds and 5 git commands to generate.