Commit ba98f2bd authored by Damien Fouilleul's avatar Damien Fouilleul

- fixed Cygwin issue when linking/building shared libvlc.dll

parent 03074537
......@@ -216,7 +216,7 @@ include Modules.am
LTLIBVLC = \$(top_builddir)/src/libvlc.la
if BUILD_SHARED
LIBVLC = \$(top_builddir)/src/libvlc\$(LIBEXT)
LIBVLC = -L\$(top_builddir)/src -lvlc
LIBADD = \$(LIBVLC)
endif
......
......@@ -190,10 +190,11 @@ endif
if HAVE_WIN32
if BUILD_SHARED
DATA_noinst_libvlc = libvlc$(LIBEXT)
DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a
endif
libvlc.dll.a: libvlc$(LIBEXT)
$(DLLTOOL) --export-all-symbols -l $@ -D $< $(libvlc_a_OBJECTS)
libvlc$(LIBEXT): $(OBJECTS_libvlc_so) stamp-builtins
@ldfl="`$(VLC_CONFIG) --libs plugin vlc builtin $(pic)` $(INCLUDED_LIBINTL)" ; \
......@@ -204,12 +205,12 @@ libvlc$(LIBEXT): $(OBJECTS_libvlc_so) stamp-builtins
esac ; \
echo $$ld $(OBJECTS_libvlc_so) $(LDFLAGS_libvlc_so) $$ldfl; \
$$ld $(libvlc_a_OBJECTS) \
-Wl,--out-implib,$(top_builddir)/src/libvlc.dll.a $$ldfl
$$ldfl
# It sucks big time, but we have to do that to link vlc properly
# on non-PIC OSes, otherwise ld will favor builtins-less libvlc.a over
# libvlc$(LIBEXT)
rm -f libvlc.a
# Cygwin work-around
# Cygwin libtool work-around
@if test -f "$@.exe"; then mv -f "$@.exe" "$@"; fi
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment