Indicate that lttng-ust 2.13+ is required
[deliverable/lttng-ust-mpi.git] / Makefile
CommitLineData
66e983e2
OD
1# SPDX-License-Identifier: MIT
2#
e8418583 3# SPDX-FileCopyrightText: 2023 Olivier Dion <odion@efficios.com>
66e983e2
OD
4
5# Configure me:
6
7## The provider of the events.
8PROVIDER?=mpi
9
10## The MPI header to use.
11MPI_HEADER?=$(shell pkg-config --variable=includedir ompi)/mpi.h
12
13LTTNG_UST_CFLAGS=$(shell pkg-config --cflags lttng-ust)
14LTTNG_UST_LIBS=$(shell pkg-config --libs lttng-ust)
15
16# Do not modify below.
5416dc35
KS
17EXTRA_CFLAGS=$(LTTNG_UST_CFLAGS) $(CFLAGS)
18EXTRA_LIBS=$(LTTNG_UST_LIBS) -ldl $(LDFLAGS)
66e983e2
OD
19
20AUTOGEN_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
22all: liblttng-ust-mpi.so test-mpi
23
24clean:
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
30check: all
31 ./check
32
33test-mpi: test-mpi.c
34 mpicc -o $@ $^
35
36liblttng-ust-mpi.so: lttng-ust-mpi.c $(AUTOGEN_MPI_API)
7e2ea365 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)
66e983e2
OD
38
39lttng-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.023863 seconds and 4 git commands to generate.