Add demo test back as an example
[lttng-ust.git] / doc / examples / demo / Makefile
diff --git a/doc/examples/demo/Makefile b/doc/examples/demo/Makefile
new file mode 100644 (file)
index 0000000..41f4321
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright (C) 2013  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 people may see how to build
+# a program and tracepoint provider probes as stand-alone shared objects.
+
+CC = gcc
+LIBS = -ldl    # On Linux
+#LIBS = -lc    # On BSD
+CFLAGS = -I.
+
+all: demo lttng-ust-provider-ust-tests-demo.so lttng-ust-provider-ust-tests-demo3.so
+
+lttng-ust-provider-ust-tests-demo.o: tp.c tp2.c ust_tests_demo.h ust_tests_demo2.h
+       $(CC) $(CFLAGS) -fpic -c -o $@ $<
+
+lttng-ust-provider-ust-tests-demo.so: lttng-ust-provider-ust-tests-demo.o
+       $(CC) -shared -o $@ -llttng-ust $<
+
+lttng-ust-provider-ust-tests-demo3.o: tp3.c ust_tests_demo3.h
+       $(CC) $(CFLAGS) -fpic -c -o $@ $<
+
+lttng-ust-provider-ust-tests-demo3.so: lttng-ust-provider-ust-tests-demo3.o
+       $(CC) -shared -o $@ -llttng-ust $<
+
+demo.o: demo.c
+       $(CC) $(CFLAGS) -c -o $@ $<
+
+demo: demo.o
+       $(CC) demo.o -o $@ $(LIBS)
+
+.PHONY: clean
+clean:
+       rm -f *.o *.so demo
This page took 0.029537 seconds and 4 git commands to generate.