SoW-2020-0003: Trace Hit Counters
[lttng-tools.git] / doc / examples / map / Makefile
diff --git a/doc/examples/map/Makefile b/doc/examples/map/Makefile
new file mode 100644 (file)
index 0000000..83b60a7
--- /dev/null
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2021 Francis Deslauriers <francis.deslauriers@efficios.com>
+#
+# SPDX-License-Identifier: MIT
+
+
+LOCAL_CPPFLAGS += -I. -g -O0
+LIBS_INSTRUMENTED_APP = -ldl -llttng-ust
+LIBS_QUERY_EXAMPLE = -llttng-ctl
+AM_V_P := :
+
+all: instrumented-app query-example
+
+tracepoint-incr-value-example.o: tracepoint-incr-value-example.c tracepoint-incr-value-example.h
+       @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
+               $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
+
+instrumented-app.o: instrumented-app.c
+       @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
+               $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
+
+instrumented-app: instrumented-app.o tracepoint-incr-value-example.o
+       @if $(AM_V_P); then set -x; else echo "  CCLD     $@"; fi; \
+               $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+               $(CFLAGS) instrumented-app.o tracepoint-incr-value-example.o $(LIBS_INSTRUMENTED_APP)
+
+query-example: query-example.c
+       @if $(AM_V_P); then set -x; else echo "  CC       $@"; fi; \
+               $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -o $@ $< $(LIBS_QUERY_EXAMPLE)
+
+.PHONY: clean
+clean:
+       rm -f *.o *.a instrumented-app query-example
This page took 0.025117 seconds and 5 git commands to generate.