Damien Lespiau 2faf5a8665 quick-dump: Make quick dump link against libintel_tools
Because quick-dump was only selecting a few files in lib/ and we move
stuff around and/or add new dependencies we were failing to provide the
necessary symbols to the shim library providing python bindings. And so
we had a run-time error:

Traceback (most recent call last):
  File "./tools/quick_dump/quick_dump.py", line 17, in <module>
    import chipset
  File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset.py", line 28, in <module>
    _chipset = swig_import_helper()
  File "/home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/chipset.py", line 24, in swig_import_helper
    _mod = imp.load_module('_chipset', fp, pathname, description)
  File "/usr/lib64/python3.3/imp.py", line 183, in load_module
    return load_dynamic(name, filename, file)
ImportError: /home/damien/gfx/sources/intel-gpu-tools/tools/quick_dump/_chipset.so: undefined symbol: kmstest_pipe_name

So, let's simplify maintainance and just link against the library we're
building and using elsewhere.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-06 18:58:11 +01:00

30 lines
1.0 KiB
Makefile

AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib $(PYTHON_CPPFLAGS) $(DRM_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)
BUILT_SOURCES = chipset_wrap_python.c
dist_bin_SCRIPTS = quick_dump.py reg_access.py
bin_SCRIPTS = chipset.py
lib_LTLIBRARIES = I915ChipsetPython.la
I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS)
I915ChipsetPython_la_SOURCES = chipset_wrap_python.c chipset_macro_wrap.c
I915ChipsetPython_la_LIBADD = \
$(top_builddir)/lib/libintel_tools.la \
$(PCIACCESS_LIBS) \
$(DRM_LIBS) \
$(CAIRO_LIBS) \
$(NULL)
chipset_wrap_python.c chipset.py: chipset.i
$(AM_V_GEN)$(SWIG) $(AX_SWIG_PYTHON_OPT) -I/usr/include -I$(top_srcdir)/lib -o $@ $<
all-local: I915ChipsetPython.la
$(LN_S) -f .libs/I915ChipsetPython.so _chipset.so
CLEANFILES = chipset_wrap_python.c chipset.py _chipset.so
EXTRA_DIST = $(QUICK_DUMP_EXTRA_DIST) \
base_display.txt base_interrupt.txt base_other.txt base_power.txt base_rings.txt \
quick_dump.py \
reg_access.py \
chipset.i chipset.py