Commit 6ed527e8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use shared libvlc on Win32

parent 98b71c25
...@@ -286,13 +286,9 @@ LIB_libvlc = libvlc.la ...@@ -286,13 +286,9 @@ LIB_libvlc = libvlc.la
LIBVLC = src/$(LIB_libvlc) LIBVLC = src/$(LIB_libvlc)
vlc_LDFLAGS = vlc_LDFLAGS =
else else
if BUILD_SHARED
vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc` -Wl,-rpath $(libdir) -L$(top_builddir)/src -lvlc
if HAVE_WIN32 if HAVE_WIN32
vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc` -Wl,-rpath $(libdir) -L$(top_builddir)/src -lvlc
LIB_libvlc = libvlc.dll.a LIB_libvlc = libvlc.dll.a
else
LIB_libvlc = libvlc$(LIBEXT)
endif
LIBVLC = LIBVLC =
else else
vlc_LDFLAGS = $(vlc_WORKAROUNDLFDLAGS) `$(VLC_CONFIG) --libs vlc builtin` vlc_LDFLAGS = $(vlc_WORKAROUNDLFDLAGS) `$(VLC_CONFIG) --libs vlc builtin`
...@@ -670,9 +666,7 @@ package-win-common: ...@@ -670,9 +666,7 @@ package-win-common:
# Copy relevant files # Copy relevant files
cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/" cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/" cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
if BUILD_SHARED
cp "src/libvlc$(LIBEXT)" "vlc-${VERSION}/" cp "src/libvlc$(LIBEXT)" "vlc-${VERSION}/"
endif
for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \ for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \ do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
...@@ -739,9 +733,7 @@ endif ...@@ -739,9 +733,7 @@ endif
package-win-common-strip: package-win-common-strip:
$(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)" $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
if BUILD_SHARED
$(STRIP) "vlc-${VERSION}/libvlc$(LIBEXT)" $(STRIP) "vlc-${VERSION}/libvlc$(LIBEXT)"
endif
if BUILD_MOZILLA if BUILD_MOZILLA
$(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT); $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
endif endif
......
...@@ -64,11 +64,7 @@ DIST_misc = \ ...@@ -64,11 +64,7 @@ DIST_misc = \
test.html \ test.html \
$(NULL) $(NULL)
if BUILD_SHARED
LIBRARIES_libvlc = $(top_builddir)/src/libvlc.dll.a LIBRARIES_libvlc = $(top_builddir)/src/libvlc.dll.a
else
LIBRARIES_libvlc = $(top_builddir)/src/libvlc.a
endif
if BUILD_ACTIVEX if BUILD_ACTIVEX
...@@ -76,7 +72,7 @@ noinst_LIBRARIES_activex = libaxvlc.a ...@@ -76,7 +72,7 @@ noinst_LIBRARIES_activex = libaxvlc.a
axvlc_DATA = axvlc$(LIBEXT) axvlc_DATA = axvlc$(LIBEXT)
axvlcdir = $(libdir) axvlcdir = $(libdir)
LDFLAGS_activex = `$(VLC_CONFIG) --libs activex libvlc builtin` LDFLAGS_activex = `$(VLC_CONFIG) --libs activex libvlc`
libaxvlc_a_SOURCES = $(SOURCES_activex) $(SOURCE_dll) libaxvlc_a_SOURCES = $(SOURCES_activex) $(SOURCE_dll)
libaxvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags activex` libaxvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags activex`
...@@ -84,7 +80,7 @@ libaxvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex` ...@@ -84,7 +80,7 @@ libaxvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags activex`
libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc) $(LIBRARIES_libvlc) libaxvlc_a_DEPENDENCIES = axvlc.def $(DATA_axvlc_rc) $(LIBRARIES_libvlc)
axvlc$(LIBEXT): $(libaxvlc_a_OBJECTS) \ axvlc$(LIBEXT): $(libaxvlc_a_OBJECTS) \
$(libaxvlc_a_DEPENDENCIES) stamp-builtin $(libaxvlc_a_DEPENDENCIES)
$(CXXLINK) $(libaxvlc_a_OBJECTS) $(DATA_axvlc_rc) \ $(CXXLINK) $(libaxvlc_a_OBJECTS) $(DATA_axvlc_rc) \
$(srcdir)/axvlc.def \ $(srcdir)/axvlc.def \
$(LIBRARIES_libvlc) -shared $(LIBRARIES_libvlc) $(LDFLAGS_activex) \ $(LIBRARIES_libvlc) -shared $(LIBRARIES_libvlc) $(LDFLAGS_activex) \
...@@ -133,21 +129,6 @@ clean-tlb: ...@@ -133,21 +129,6 @@ clean-tlb:
endif endif
###############################################################################
# Stamp rules
###############################################################################
clean-stamp:
rm -f stamp-builtin
if BUILD_SHARED
stamp-builtin:
else
stamp-builtin: $(shell ${VLC_CONFIG} --target builtin)
endif
@touch $@
############################################################################### ###############################################################################
# Clean rules # Clean rules
############################################################################### ###############################################################################
......
...@@ -279,7 +279,7 @@ m4_defun([AC_PROG_F77],[]) ...@@ -279,7 +279,7 @@ m4_defun([AC_PROG_F77],[])
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_ARG_ENABLE(libtool, AC_ARG_ENABLE(libtool,
[ --enable-libtool use libtool (default disabled)]) [ --enable-libtool use libtool (default enabled)])
AM_CONDITIONAL(USE_LIBTOOL, [test "x${enable_libtool}" != "xno"]) AM_CONDITIONAL(USE_LIBTOOL, [test "x${enable_libtool}" != "xno"])
...@@ -1444,15 +1444,6 @@ AC_ARG_ENABLE(release, ...@@ -1444,15 +1444,6 @@ AC_ARG_ENABLE(release,
[ --enable-release activate extra optimizations (default disabled)]) [ --enable-release activate extra optimizations (default disabled)])
test "${enable_release}" != "yes" && enable_release="no" test "${enable_release}" != "yes" && enable_release="no"
dnl
dnl Is the shared libvlc forced ?
dnl
AC_ARG_ENABLE(shared-libvlc,
[ --enable-shared-libvlc Win32 libvlc.dll build (default disabled)])
AS_IF([test "${enable_libtool}" != "no" && test "${enable_shared_libvlc}"], [
AC_MSG_ERROR([--enable-shared-libvlc and --enable-libtool are mutually exclusive])
])
dnl dnl
dnl Stream output dnl Stream output
dnl dnl
...@@ -5547,9 +5538,7 @@ AS_IF([${plugin_support}], [ ...@@ -5547,9 +5538,7 @@ AS_IF([${plugin_support}], [
dnl dnl
dnl Pic and shared libvlc stuff dnl Pic and shared libvlc stuff
dnl dnl
AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no]) AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [
AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"])
AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.]) AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll" FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
VLC_ADD_PLUGINS([${BUILTINS}]) VLC_ADD_PLUGINS([${BUILTINS}])
......
...@@ -23,13 +23,8 @@ SOURCES_mozilla_common = \ ...@@ -23,13 +23,8 @@ SOURCES_mozilla_common = \
DIST_sources = $(SOURCES_mozilla_common) \ DIST_sources = $(SOURCES_mozilla_common) \
support/npwin.cpp support/npmac.cpp support/npunix.c support/npwin.cpp support/npmac.cpp support/npunix.c
if BUILD_SHARED
LIBRARIES_libvlc_pic = -Wl,-rpath '$(libdir)' -L$(top_builddir)/src -lvlc LIBRARIES_libvlc_pic = -Wl,-rpath '$(libdir)' -L$(top_builddir)/src -lvlc
LIBRARIES_libvlc_nopic = $(LIBRARIES_libvlc_pic) LIBRARIES_libvlc_nopic = $(LIBRARIES_libvlc_pic)
else
LIBRARIES_libvlc_pic = $(top_builddir)/src/libvlc.a
LIBRARIES_libvlc_nopic = $(top_builddir)/src/libvlc.a
endif
if BUILD_MOZILLA if BUILD_MOZILLA
......
...@@ -154,9 +154,7 @@ pic = pic ...@@ -154,9 +154,7 @@ pic = pic
endif endif
if HAVE_WIN32 if HAVE_WIN32
if BUILD_SHARED
DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a DATA_noinst_libvlc = libvlc$(LIBEXT) libvlc$(LIBEXT).a
endif
libvlc.dll.a: libvlc$(LIBEXT) libvlc.dll.a: libvlc$(LIBEXT)
$(DLLTOOL) --export-all-symbols -l $@ -D $< $(libvlc_a_OBJECTS) $(DLLTOOL) --export-all-symbols -l $@ -D $< $(libvlc_a_OBJECTS)
...@@ -330,7 +328,7 @@ SOURCES_libvlc_control = \ ...@@ -330,7 +328,7 @@ SOURCES_libvlc_control = \
control/mediacontrol_audio_video.c control/mediacontrol_audio_video.c
if !USE_LIBTOOL if !USE_LIBTOOL
if !BUILD_SHARED if !HAVE_WIN32
CLEANFILES += misc/version.c CLEANFILES += misc/version.c
endif endif
...@@ -351,7 +349,7 @@ misc/version.c: FORCE ...@@ -351,7 +349,7 @@ misc/version.c: FORCE
############################################################################### ###############################################################################
if !USE_LIBTOOL if !USE_LIBTOOL
if !BUILD_SHARED if !HAVE_WIN32
stamp-api: Makefile.in $(HEADERS_include) ../vlc-api.pl stamp-api: Makefile.in $(HEADERS_include) ../vlc-api.pl
( cd $(srcdir) && cat $(HEADERS_include) ) | \ ( cd $(srcdir) && cat $(HEADERS_include) ) | \
top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl top_srcdir="$(top_srcdir)" perl $(top_srcdir)/vlc-api.pl
......
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