Commit | Line | Data |
---|---|---|
c0c0989a MJ |
1 | # SPDX-License-Identifier: MIT |
2 | # | |
f9364363 MD |
3 | # Copyright (C) 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
4 | # Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
5 | # | |
f9364363 MD |
6 | # This Makefile is not using automake so that users may see how to build |
7 | # a program with tracepoint provider probes as stand-alone shared objects. | |
8 | # | |
9 | # This makefile is purposefully kept simple to support GNU and BSD make. | |
10 | ||
f9364363 MD |
11 | LIBS = -ldl # On Linux |
12 | #LIBS = -lc # On BSD | |
13 | LOCAL_CPPFLAGS += -I. | |
dc5af9e3 | 14 | AM_V_P := : |
f9364363 MD |
15 | |
16 | all: lttng-ust-clock-override-example.so | |
17 | ||
18 | lttng-ust-clock-override-example.o: lttng-ust-clock-override-example.c | |
dc5af9e3 MJ |
19 | @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \ |
20 | $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \ | |
e1c62734 | 21 | $(CFLAGS) -fpic -c -o $@ $< |
f9364363 MD |
22 | |
23 | lttng-ust-clock-override-example.so: lttng-ust-clock-override-example.o | |
dc5af9e3 MJ |
24 | @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \ |
25 | $(CC) -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \ | |
40c1d6b9 | 26 | $(AM_LDFLAGS) $(CFLAGS) -shared -fpic lttng-ust-clock-override-example.o |
f9364363 MD |
27 | |
28 | .PHONY: clean | |
29 | clean: | |
30 | rm -f *.o *.so |