summaryrefslogtreecommitdiff
path: root/_dbus_bindings/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to '_dbus_bindings/Makefile.am')
-rw-r--r--_dbus_bindings/Makefile.am20
1 files changed, 19 insertions, 1 deletions
diff --git a/_dbus_bindings/Makefile.am b/_dbus_bindings/Makefile.am
index 2a5ec28..42c9f91 100644
--- a/_dbus_bindings/Makefile.am
+++ b/_dbus_bindings/Makefile.am
@@ -3,7 +3,25 @@ pyexec_LTLIBRARIES = _dbus_bindings.la
AM_CPPFLAGS = -I$(top_srcdir)/include $(DBUS_CFLAGS) $(PYTHON_INCLUDES)
AM_LDFLAGS = -module -avoid-version \
-export-symbols-regex \(PyInit__\|init_\)dbus_bindings \
- $(DBUS_LIBS)
+ $(NULL)
+
+libadd = $(DBUS_LIBS)
+
+if WINDOWS
+# Win32 DLLs can't have undefined symbols (so this needs explicit linking
+# against the Python DLL), and Python expects extensions to be *.pyd
+# instead of *.dll
+AM_LDFLAGS += \
+ -no-undefined \
+ -shrext ".pyd" \
+ $(NULL)
+
+libadd += \
+ $(PYTHON_LIBS) \
+ $(NULL)
+endif
+
+_dbus_bindings_la_LIBADD = $(libadd)
_dbus_bindings_la_SOURCES = \
abstract.c \
bus.c \