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
70 libpyglib-gi-2.0-@PYTHON_BASENAME@.la
72 $(extension_ldflags) \
73 -export-symbols-regex "_glib|PyInit__glib"
76 _glib_la_CFLAGS += -DPLATFORM_WIN32
79 # if we build in a separate tree, we need to symlink the *.py files from the
80 # source tree; Python does not accept the extensions and modules in different
83 for f in $(pyglib_PYTHON); do \
84 [ -e $(builddir)/$$f ] || $(LN_S) $(srcdir)/$$f $(builddir)/$$f; \
88 all: $(pyglib_LTLIBRARIES:.la=.so) build_pylinks
89 check-local: $(pyglib_LTLIBRARIES:.la=.so) build_pylinks
91 rm -f $(pyglib_LTLIBRARIES:.la=.so)
93 $(LN_S) -f .libs/$@ $@