win32: build: stop using .def files

With visibility now under the control of __declspec(dllexport) we no
longer need to build .def files or use them for building our various
.dll files.

.def files used to be installed (even though it is only really useful
when creating the .dll or .lib file).  Don't do that anymore either.

The Makefiles still contain rules to create a .lib file for use with
Visual Studio and these rules require .def files.  There are special
requirements to using these rules (like having installed and setup
Microsoft tools for use during the build) and therefore the problem of
creating a .def file for use with them is left open to anyone willing to
make the effort.  Many options are available depending on which
toolchain is in use (dlltool, pexport, gendef, dumpbin.exe, just to name
a few).

If we can find a free tool for creating .lib files in the future, we
should probably revisit this issue and add proper support back to our
build system.
This commit is contained in:
Ryan Lortie
2013-01-13 15:41:03 -05:00
parent 2e7669f5cc
commit 068a119f74
4 changed files with 9 additions and 71 deletions

View File

@@ -7,9 +7,6 @@ AM_CPPFLAGS = \
@GLIB_DEBUG_FLAGS@ \
-DG_DISABLE_DEPRECATED
gmodule.def: gmodule.symbols
$(AM_V_GEN) (echo EXPORTS; $(CPP) -P - <$(srcdir)/gmodule.symbols | sed -e '/^$$/d' -e 's/^/ /') > $(builddir)/gmodule.def
EXTRA_DIST += \
makefile.msc.in \
gmoduleconf.h.in \
@@ -61,20 +58,8 @@ no_undefined = -no-undefined
endif
if OS_WIN32_AND_DLL_COMPILATION
export_symbols = -export-symbols $(builddir)/gmodule.def
gmodule_def = gmodule.def
gmodule_win32_res = gmodule-win32-res.o
gmodule_win32_res_ldflag = -Wl,$(gmodule_win32_res)
install-def-file:
$(INSTALL) $(builddir)/gmodule.def $(DESTDIR)$(libdir)/gmodule-2.0.def
uninstall-def-file:
-rm $(DESTDIR)$(libdir)/gmodule-2.0.def
else
install-def-file:
uninstall-def-file:
endif
libgmodule_2_0_la_SOURCES = gmodule.c
@@ -111,9 +96,9 @@ dist-hook: $(BUILT_EXTRA_DIST)
cp $$d/$$f $(distdir) || exit 1; done
install-data-local: install-ms-lib install-def-file
install-data-local: install-ms-lib
uninstall-local: uninstall-ms-lib uninstall-def-file
uninstall-local: uninstall-ms-lib
if HAVE_GLIB_RUNTIME_LIBDIR
install-data-hook: