Index: src/Makefile.am =================================================================== --- src/Makefile.am (revision 22620) +++ src/Makefile.am (working copy) @@ -62,6 +62,28 @@ Win32Resources.lo: $(top_srcdir)/src/wp/main/win/Win32Main.rc CPPFLAGS="$(WINDRES_CPPFLAGS)" $(top_srcdir)/lt-compile-resource $< $@ + +if OS_WIN32 + +CLEANFILES = libabiword.dll + +DLLOBJDIR = .dll + +all-local: libabiword.dll +clean-local: + rm -rf $(DLLOBJDIR) + +DLLWRAP = $(shell which i586-mingw32msvc-dllwrap) +DLLWRAP_FLAGS = --as=$(AS) --export-all --driver-name $(CXX) -s +libabiword.dll: $(lib_LTLIBRARIES) + rm -rf $(DLLOBJDIR) && mkdir $(DLLOBJDIR) && cd $(DLLOBJDIR) && $(AR) x ../.libs/`basename $(lib_LTLIBRARIES) .la`.a + $(DLLWRAP) $(DLLWRAP_FLAGS) \ + --output-def libabiword.def --implib libabiword.dll.a \ + -o $@ `ls $(DLLOBJDIR)/*.o` \ + $(DEPS_LIBS) +endif + + bin_PROGRAMS = @@ -112,5 +134,6 @@ endif # ENABLE_STATIC + include $(top_srcdir)/objc.mk Index: plugins/opendocument/Makefile.am =================================================================== --- plugins/opendocument/Makefile.am (revision 22620) +++ plugins/opendocument/Makefile.am (working copy) @@ -17,5 +17,20 @@ libopendocument_la_SOURCES = +CLEANFILES = libopendocument.dll + +all-local: libopendocument.dll + +# TODO this breaks when stale objects are around, +# better do the archive unpacking thing, like for libabiword.dll +OPENDOCUMENT_OBJS = $(shell find . -name '*.o') +DLLWRAP = $(shell which i586-mingw32msvc-dllwrap) +DLLWRAP_FLAGS = --as=$(AS) --export-all --driver-name $(CXX) -s +libopendocument.dll: $(OPENDOCUMENT_OBJS) + $(DLLWRAP) $(DLLWRAP_FLAGS) \ + --output-def libopendocument.def --implib libopendocument.dll.a \ + -o $@ $(OPENDOCUMENT_OBJS) \ + $(OPENDOCUMENT_LIBS) + EXTRA_DIST = \ plugin.m4 Index: configure.in =================================================================== --- configure.in (revision 22621) +++ configure.in (working copy) @@ -441,6 +441,7 @@ AM_CONDITIONAL([TOOLKIT_COCOA], test "$TOOLKIT" == "cocoa") AM_CONDITIONAL([TOOLKIT_GTK], test "$TOOLKIT" == "gtk") AM_CONDITIONAL([TOOLKIT_WIN], test "$TOOLKIT" == "win") +AM_CONDITIONAL([OS_WIN32], test "$TOOLKIT" == "win") if test "$enable_dynamic" == ""; then enable_dynamic="no" @@ -484,7 +485,7 @@ PLUGIN_LIBS='-L${top_builddir}/src'" -labiword-$ABIWORD_SERIES" elif test "$TOOLKIT" == "win"; then # link plugins to the executable so they can be loaded - PLUGIN_LIBS='-L${top_builddir}/src -labiword.exe' + PLUGIN_LIBS='-L${top_builddir}/src -labiword' fi AC_SUBST([PLUGIN_LIBS])