12 # Windows requires Python modules to be explicitly linked to libpython.
13 # Extension modules are shared libaries (.dll), but need to be
14 # called .pyd for Python to load it as an extension module.
18 extension_ldflags += \
24 pyglibdir = $(pyexecdir)/gi/_glib
30 lib_LTLIBRARIES = libpyglib-gi-2.0-@PYTHON_BASENAME@.la
32 libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES = \
36 pyglib-python-compat.h
37 libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CPPFLAGS = \
39 libpyglib_gi_2_0_@PYTHON_BASENAME@_la_CFLAGS = \
41 libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LIBADD = \
47 libpyglib_gi_2_0_@PYTHON_BASENAME@_la_LDFLAGS = \
51 pyglib_LTLIBRARIES = _glib.la
76 libpyglib-gi-2.0-@PYTHON_BASENAME@.la
78 $(extension_ldflags) \
79 -export-symbols-regex "_glib|PyInit__glib"
82 _glib_la_CFLAGS += -DPLATFORM_WIN32
85 # if we build in a separate tree, we need to symlink the *.py files from the
86 # source tree; Python does not accept the extensions and modules in different
89 for f in $(pyglib_PYTHON); do \
90 [ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
94 all: $(pyglib_LTLIBRARIES:.la=.so) build_pylinks
95 check-local: $(pyglib_LTLIBRARIES:.la=.so) build_pylinks
97 rm -f $(pyglib_LTLIBRARIES:.la=.so)
99 $(LN_S) .libs/$@ $@ || true