Add lttng-ctl SWIG python bindings
[lttng-tools.git] / extras / bindings / swig / python / Makefile.am
1 lttng.i: lttng.i.in
2 sed "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" <lttng.i.in >lttng.i
3
4 AM_CFLAGS = -I$(PYTHON_INCLUDE) -I$(top_srcdir)/lib/lttng-ctl -I../common \
5 $(BUDDY_CFLAGS)
6
7 EXTRA_DIST = lttng.i
8 python_PYTHON = lttng.py
9 pyexec_LTLIBRARIES = _lttng.la
10
11 MAINTAINERCLEANFILES = lttng_wrap.c lttng.py
12
13 _lttng_la_SOURCES = lttng_wrap.c
14
15 _lttng_la_LDFLAGS = -module
16
17 _lttng_la_LIBADD = $(top_srcdir)/src/lib/lttng-ctl/liblttng-ctl.la \
18 $(top_srcdir)/src/common/sessiond-comm/libsessiond-comm.la
19
20 # SWIG 'warning md variable unused' fixed after SWIG build:
21 lttng_wrap.c: lttng.i
22 $(SWIG) -python -I. -I$(top_srcdir)/src/common/sessiond-comm lttng.i
23 sed -i "s/PyObject \*m, \*d, \*md;/PyObject \*m, \*d;\n#if defined(SWIGPYTHON_BUILTIN)\nPyObject *md;\n#endif/g" lttng_wrap.c
24 sed -i "s/md = d/d/g" lttng_wrap.c
25 sed -i "s/(void)public_symbol;/(void)public_symbol;\n md = d;/g" lttng_wrap.c
26
27 CLEANFILES = lttng.i lttng.py lttng_wrap.c
This page took 0.039573 seconds and 4 git commands to generate.