Move to kernel style SPDX license identifiers
[lttng-ust.git] / doc / examples / hello-static-lib / Makefile
CommitLineData
c0c0989a 1# SPDX-License-Identifier: MIT
a106a9f8 2#
c0c0989a 3# Copyright (C) 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
16c96fc0 4#
a106a9f8
JG
5# This Makefile is not using automake so that users may see how to build
6# a program with tracepoint provider probes compiled as static libraries.
16c96fc0
MD
7#
8# This makefile is purposefully kept simple to support GNU and BSD make.
a106a9f8 9
2e390600 10LOCAL_CPPFLAGS += -I.
a106a9f8
JG
11LIBS = -ldl -llttng-ust # On Linux
12#LIBS = -lc -llttng-ust # On BSD
dc5af9e3 13AM_V_P := :
43f42e0a 14AR ?= ar
a106a9f8 15
a106a9f8
JG
16all: hello
17
18lttng-ust-provider-hello.o: tp.c ust_tests_hello.h
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) -c -o $@ $<
a106a9f8
JG
22
23lttng-ust-provider-hello.a: lttng-ust-provider-hello.o
dc5af9e3 24 @if $(AM_V_P); then set -x; else echo " AR $@"; fi; \
43f42e0a 25 $(AR) -rc $@ lttng-ust-provider-hello.o
a106a9f8
JG
26
27hello.o: hello.c
dc5af9e3
MJ
28 @if $(AM_V_P); then set -x; else echo " CC $@"; fi; \
29 $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
e1c62734 30 $(CFLAGS) -c -o $@ $<
a106a9f8
JG
31
32hello: hello.o lttng-ust-provider-hello.a
dc5af9e3
MJ
33 @if $(AM_V_P); then set -x; else echo " CCLD $@"; fi; \
34 $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
e1c62734 35 $(CFLAGS) hello.o lttng-ust-provider-hello.a $(LIBS)
a106a9f8
JG
36
37.PHONY: clean
38clean:
39 rm -f *.o *.a hello
This page took 0.02694 seconds and 4 git commands to generate.