Commit | Line | Data |
---|---|---|
a106a9f8 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. | |
16c96fc0 | 11 | # |
a106a9f8 JG |
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. | |
16c96fc0 MD |
14 | # |
15 | # This makefile is purposefully kept simple to support GNU and BSD make. | |
a106a9f8 | 16 | |
2e390600 | 17 | LOCAL_CPPFLAGS += -I. |
a106a9f8 JG |
18 | LIBS = -ldl -llttng-ust # On Linux |
19 | #LIBS = -lc -llttng-ust # On BSD | |
20 | ||
a106a9f8 JG |
21 | all: hello |
22 | ||
23 | lttng-ust-provider-hello.o: tp.c ust_tests_hello.h | |
a58e9bc0 MJ |
24 | $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ |
25 | $(CFLAGS) -c -o $@ $< | |
a106a9f8 JG |
26 | |
27 | lttng-ust-provider-hello.a: lttng-ust-provider-hello.o | |
16c96fc0 | 28 | ar -rc $@ lttng-ust-provider-hello.o |
a106a9f8 JG |
29 | |
30 | hello.o: hello.c | |
a58e9bc0 MJ |
31 | $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ |
32 | $(CFLAGS) -c -o $@ $< | |
a106a9f8 JG |
33 | |
34 | hello: hello.o lttng-ust-provider-hello.a | |
16c96fc0 | 35 | $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \ |
a58e9bc0 | 36 | $(CFLAGS) hello.o lttng-ust-provider-hello.a $(LIBS) |
a106a9f8 JG |
37 | |
38 | .PHONY: clean | |
39 | clean: | |
40 | rm -f *.o *.a hello |