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

- Remove dependency of vlc on stamp-builtin with shared libvlc

- Link against -lvlc instead of src/libvlc.so otherwise installed vlc
  cannot be loaded (closes #555)
- Remove src/libvlc.a when src/libvlc.so is built so that previous item
  does not break Win32 linking

<subliminal message>how about using libtool</subliminal message>
parent 83d76fb2
...@@ -221,24 +221,25 @@ if HAVE_WINCE ...@@ -221,24 +221,25 @@ if HAVE_WINCE
vlc_WORKAROUNDLDFLAGS = $(LIB_libvlc) vlc_WORKAROUNDLDFLAGS = $(LIB_libvlc)
endif endif
if BUILD_SHARED
LIB_libvlc = src/libvlc$(LIBEXT)
vlc_config = vlc
#-Wl,-rpath $(libdir)
else
LIB_libvlc = src/libvlc.a
vlc_config = vlc builtin
endif
vlc_LDFLAGS = `$(VLC_CONFIG) --libs $(vlc_config)` $(vlc_WORKAROUNDLDFLAGS)
vlc_LDADD = $(LIB_libvlc) $(DATA_win32_rc) $(INCLUDED_LIBINTL)
vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc` vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
vlc_LDFLAGS = $(LDFLAGS_libvlc) $(vlc_WORKAROUNDLDFLAGS)
vlc_LDADD = $(DATA_win32_rc) $(INCLUDED_LIBINTL)
# We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
# old automake-1.5 bug (automake/279). # old automake-1.5 bug (automake/279).
DEPENDENCIES_vlc = $(LIB_libvlc) $(DATA_win32_rc) DEPENDENCIES_vlc = $(LIB_libvlc) $(DATA_win32_rc)
vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin if BUILD_SHARED
vlc_LDFLAGS += `$(VLC_CONFIG) --libs vlc` -Wl,-rpath $(libdir) -Lsrc -lvlc
LIB_libvlc = src/libvlc$(LIBEXT)
else
vlc_LDFLAGS += `$(VLC_CONFIG) --libs vlc builtin`
vlc_LDADD += $(LIB_libvlc)
LIB_libvlc = src/libvlc.a
DEPENDENCIES_vlc += stamp-builtin
endif
vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc)
@rm -f vlc$(EXEEXT) @rm -f vlc$(EXEEXT)
@case `$(VLC_CONFIG) --linkage $(vlc_config)` in \ @case `$(VLC_CONFIG) --linkage $(vlc_config)` in \
c++) cmd="$(CXXLINK)" ;; \ c++) cmd="$(CXXLINK)" ;; \
......
...@@ -200,6 +200,10 @@ libvlc$(LIBEXT): $(OBJECTS_libvlc_so) builtins ...@@ -200,6 +200,10 @@ libvlc$(LIBEXT): $(OBJECTS_libvlc_so) builtins
esac ; \ esac ; \
echo $$ld $(OBJECTS_libvlc_so) $$ldfl ; \ echo $$ld $(OBJECTS_libvlc_so) $$ldfl ; \
$$ld $(OBJECTS_libvlc_so) $$ldfl $$ld $(OBJECTS_libvlc_so) $$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
EXTRA_DIST += \ EXTRA_DIST += \
$(SOURCES_libvlc_beos) \ $(SOURCES_libvlc_beos) \
......
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