Commit | Line | Data |
---|---|---|
60302adc JG |
1 | # Copyright (C) 2013 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 people may see how to build | |
13 | # a program and tracepoint provider probes as stand-alone shared objects. | |
14 | ||
15 | CC = gcc | |
16 | LIBS = -ldl # On Linux | |
17 | #LIBS = -lc # On BSD | |
18 | CFLAGS = -I. | |
19 | ||
20 | all: demo lttng-ust-provider-ust-tests-demo.so lttng-ust-provider-ust-tests-demo3.so | |
21 | ||
22 | lttng-ust-provider-ust-tests-demo.o: tp.c tp2.c ust_tests_demo.h ust_tests_demo2.h | |
23 | $(CC) $(CFLAGS) -fpic -c -o $@ $< | |
24 | ||
25 | lttng-ust-provider-ust-tests-demo.so: lttng-ust-provider-ust-tests-demo.o | |
26 | $(CC) -shared -o $@ -llttng-ust $< | |
27 | ||
28 | lttng-ust-provider-ust-tests-demo3.o: tp3.c ust_tests_demo3.h | |
29 | $(CC) $(CFLAGS) -fpic -c -o $@ $< | |
30 | ||
31 | lttng-ust-provider-ust-tests-demo3.so: lttng-ust-provider-ust-tests-demo3.o | |
32 | $(CC) -shared -o $@ -llttng-ust $< | |
33 | ||
34 | demo.o: demo.c | |
35 | $(CC) $(CFLAGS) -c -o $@ $< | |
36 | ||
37 | demo: demo.o | |
38 | $(CC) demo.o -o $@ $(LIBS) | |
39 | ||
40 | .PHONY: clean | |
41 | clean: | |
42 | rm -f *.o *.so demo |