[vlc-commits] Generate .def files with gendef

Rafaël Carré git at videolan.org
Sun Mar 17 11:34:44 CET 2013


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Mar 17 11:32:53 2013 +0100| [d49e2ef6ace0de681ca3c5afea5751699908e877] | committer: Rafaël Carré

Generate .def files with gendef

Should avoid the need for http://wiki.videolan.org/GenerateLibFromDll

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d49e2ef6ace0de681ca3c5afea5751699908e877
---

 configure.ac                     |    4 ++++
 extras/package/win32/package.mak |    6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index ee8650e..20daefe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,10 @@ case "${host_os}" in
   *mingw32* | *cygwin* | *wince* | *mingwce*)
     AC_CHECK_TOOL(WINDRES, windres, :)
     AC_CHECK_TOOL(OBJCOPY, objcopy, :)
+    AC_PATH_PROGS(GENDEF,[${GENDEF} gendef], [false])
+    AS_IF([test "${GENDEF}" = "false"], [
+        AC_MSG_ERROR([Could not find gendef.])
+    ])
     AH_TOP([#if defined(WIN32) && !defined(_WIN32_WINNT)])
     AH_TOP([# define _WIN32_WINNT 0x0502 /* Windows XP SP2 */])
     AH_TOP([#endif])
diff --git a/extras/package/win32/package.mak b/extras/package/win32/package.mak
index 564a33c..28e3d03 100644
--- a/extras/package/win32/package.mak
+++ b/extras/package/win32/package.mak
@@ -74,8 +74,10 @@ endif
 	cp -r $(prefix)/include "$(win32_destdir)/sdk"
 	cp -r $(prefix)/lib/pkgconfig "$(win32_destdir)/sdk/lib"
 	cd $(prefix)/lib && cp -rv libvlc.dll.a libvlc.la libvlccore.dll.a libvlccore.la "$(win32_destdir)/sdk/lib/"
-	$(DLLTOOL) -D libvlc.dll -l "$(win32_destdir)/sdk/lib/libvlc.lib" -d "$(top_builddir)/lib/.libs/libvlc.dll.def" "$(prefix)/bin/libvlc.dll"
-	$(DLLTOOL) -D libvlccore.dll -l "$(win32_destdir)/sdk/lib/libvlccore.lib" -d "$(top_builddir)/src/.libs/libvlccore.dll.def" "$(prefix)/bin/libvlccore.dll"
+	cd "$(prefix)/bin" && $(GENDEF) "libvlc.dll"
+	$(DLLTOOL) -D libvlc.dll -l "$(win32_destdir)/sdk/lib/libvlc.lib" -d "$(prefix)/bin/libvlc.def" "$(prefix)/bin/libvlc.dll"
+	cd "$(prefix)/bin" && $(GENDEF) "libvlccore.dll"
+	$(DLLTOOL) -D libvlccore.dll -l "$(win32_destdir)/sdk/lib/libvlccore.lib" -d "$(prefix)/bin/libvlccore.def" "$(prefix)/bin/libvlccore.dll"
 
 	mkdir -p "$(win32_destdir)/sdk/activex/"
 	cd $(top_builddir)/npapi-vlc && cp activex/README.TXT share/test/test.html $(win32_destdir)/sdk/activex/



More information about the vlc-commits mailing list