| 1 |
# SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
include $(top_srcdir)/aminclude_static.am |
| 4 |
|
| 5 |
lttng.i: lttng.i.in |
| 6 |
$(SED) "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" < $(srcdir)/lttng.i.in >lttng.i |
| 7 |
|
| 8 |
# Some versions of SWIG (like 3.0.12) generate code where a parameter called |
| 9 |
# `swig_this` shadows a global of the same name. Later versions (like 4.0.1) |
| 10 |
# have renamed this global to `Swig_This_global`. |
| 11 |
# |
| 12 |
# Disable some warning flags for that file. |
| 13 |
AM_CFLAGS += \ |
| 14 |
-Wno-cast-function-type \ |
| 15 |
-Wno-missing-field-initializers \ |
| 16 |
-Wno-null-dereference \ |
| 17 |
-Wno-redundant-decls \ |
| 18 |
-Wno-shadow \ |
| 19 |
-Wno-unused-parameter |
| 20 |
|
| 21 |
# Swig regularily changes and generates code that results warnings which break |
| 22 |
# Werror builds. Disable that option for this sub-project. |
| 23 |
AM_CFLAGS += -Wno-error |
| 24 |
|
| 25 |
AM_CPPFLAGS += $(PYTHON_INCLUDE) |
| 26 |
|
| 27 |
EXTRA_DIST = lttng.i.in |
| 28 |
nodist_python_PYTHON = lttng.py |
| 29 |
pyexec_LTLIBRARIES = _lttng.la |
| 30 |
|
| 31 |
MAINTAINERCLEANFILES = lttng_wrap.c lttng.py |
| 32 |
|
| 33 |
nodist__lttng_la_SOURCES = lttng_wrap.c |
| 34 |
_lttng_la_LDFLAGS = -module |
| 35 |
_lttng_la_LIBADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ |
| 36 |
$(top_builddir)/src/common/libsessiond-comm.la \ |
| 37 |
$(top_builddir)/src/common/libcommon-gpl.la |
| 38 |
|
| 39 |
# Use this fake source file to force the link mode of the library |
| 40 |
# from gcc to g++. The library contains only C code, but depends on |
| 41 |
# libstdc++. |
| 42 |
nodist_EXTRA__lttng_la_SOURCES = dummy.cpp |
| 43 |
|
| 44 |
lttng_wrap.c: lttng.i |
| 45 |
$(SWIG) -python -I. -I$(top_srcdir)/src/common/sessiond-comm lttng.i |
| 46 |
|
| 47 |
CLEANFILES = lttng.i lttng.py lttng_wrap.c lttng.pyc |