Indicate that lttng-ust 2.13+ is required
[deliverable/lttng-ust-mpi.git] / Makefile
1 # SPDX-License-Identifier: MIT
2 #
3 # SPDX-FileCopyrightText: 2023 Olivier Dion <odion@efficios.com>
4
5 # Configure me:
6
7 ## The provider of the events.
8 PROVIDER?=mpi
9
10 ## The MPI header to use.
11 MPI_HEADER?=$(shell pkg-config --variable=includedir ompi)/mpi.h
12
13 LTTNG_UST_CFLAGS=$(shell pkg-config --cflags lttng-ust)
14 LTTNG_UST_LIBS=$(shell pkg-config --libs lttng-ust)
15
16 # Do not modify below.
17 EXTRA_CFLAGS=$(LTTNG_UST_CFLAGS)
18 EXTRA_LIBS=$(LTTNG_UST_LIBS) -ldl
19
20 AUTOGEN_MPI_API=lttng-ust-mpi-defs.h lttng-ust-mpi.h lttng-ust-mpi-classes.h lttng-ust-mpi-impl.c lttng-ust-mpi-states.h
21
22 all: liblttng-ust-mpi.so test-mpi
23
24 clean:
25 rm -f $(AUTOGEN_MPI_API)
26 rm -f null.o
27 rm -f liblttng-ust-mpi.so test-mpi lttng-ust-mpi.c
28 rm -rf traces
29
30 check: all
31 ./check
32
33 test-mpi: test-mpi.c
34 mpicc -o $@ $^
35
36 liblttng-ust-mpi.so: lttng-ust-mpi.c $(AUTOGEN_MPI_API)
37 gcc -O2 -D ENABLE_LTTNG_TRACEPOINTS -I . -I $$(dirname $(MPI_HEADER)) -Wall -Werror -shared -fPIC $(EXTRA_CFLAGS) -o $@ lttng-ust-mpi.c lttng-ust-mpi-impl.c $(EXTRA_LIBS)
38
39 lttng-ust-mpi.c: $(MPI_HEADER) | lttng-auto-mpi-wrappers
40 ./lttng-auto-mpi-wrappers $(MPI_HEADER) $@
41
42 $(AUTOGEN_MPI_API) &: $(MPI_HEADER)
43 ./lttng-auto-ust-api --ignore MPI_Pcontrol --provider $(PROVIDER) --emulated-classes --common-prefix MPI_ $^ $(AUTOGEN_MPI_API)
44
45 .PHONY: check
This page took 0.030583 seconds and 4 git commands to generate.