Commit | Line | Data |
---|---|---|
45dc11d3 JG |
1 | NATIVEBT_PY = nativebt.py |
2 | NATIVEBT_WRAP_C = nativebt_wrap.c | |
3 | INIT_PY = __init__.py | |
4 | INIT_PY_IN = $(srcdir)/$(INIT_PY).in | |
5 | NATIVEBT_I = $(srcdir)/nativebt.i | |
6 | ||
7 | all-local: $(INIT_PY) | |
8 | ||
9 | $(INIT_PY): $(INIT_PY_IN) | |
10 | sed "s/BABELTRACE_VERSION_STR/$(PACKAGE_VERSION)/g" < $< > $@ | |
11 | ||
989e97b6 | 12 | AM_CPPFLAGS += $(PYTHON_INCLUDE) -I$(srcdir) |
45dc11d3 JG |
13 | |
14 | EXTRA_DIST = common.py reader.py writer.py $(INIT_PY_IN) $(NATIVEBT_I) | |
15 | nodist_btpackage_PYTHON = $(INIT_PY) $(NATIVEBT_PY) common.py reader.py writer.py | |
6027e07b | 16 | SCRIPT_LIST = common.py reader.py writer.py |
45dc11d3 JG |
17 | nativebtlib_LTLIBRARIES = _nativebt.la |
18 | ||
19 | btpackagedir = $(pythondir)/babeltrace | |
20 | nativebtlibdir = $(btpackagedir) | |
21 | ||
22 | MAINTAINERCLEANFILES = $(NATIVEBT_PY) $(NATIVEBT_WRAP_C) | |
23 | ||
24 | nodist__nativebt_la_SOURCES = $(NATIVEBT_WRAP_C) | |
25 | _nativebt_la_SOURCES = python-complements.h python-complements.c | |
26 | _nativebt_la_LDFLAGS = -module | |
27 | _nativebt_la_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS) | |
28 | _nativebt_la_LIBS = $(GLIB_LIBS) | |
29 | _nativebt_la_LIBADD = $(top_builddir)/formats/ctf/libbabeltrace-ctf.la | |
30 | ||
31 | # SWIG 'warning md variable unused' fixed after SWIG build: | |
32 | $(NATIVEBT_WRAP_C): $(NATIVEBT_I) | |
33 | $(SWIG) -python -Wall -I$(srcdir) -I$(top_srcdir)/include -outcurrentdir $< | |
34 | ||
35 | CLEANFILES = $(NATIVEBT_PY) $(NATIVEBT_WRAP_C) $(INIT_PY) | |
6027e07b JG |
36 | |
37 | all-local: | |
38 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
39 | for script in $(SCRIPT_LIST); do \ | |
40 | cp -f $(srcdir)/$$script $(builddir); \ | |
41 | done; \ | |
42 | fi | |
43 | ||
44 | clean-local: | |
45 | @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ | |
46 | for script in $(SCRIPT_LIST); do \ | |
47 | rm -f $(builddir)/$$script; \ | |
48 | done; \ | |
49 | fi |