[vlc-commits] bin: build a vlc-osx-static similar to vlc-static, to fix tests

David Fuhrmann git at videolan.org
Sun Jun 21 17:22:02 CEST 2015


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jun 21 17:20:35 2015 +0200| [383a20900c66ff18ea59e1feb33f5ed0052315ab] | committer: David Fuhrmann

bin: build a vlc-osx-static similar to vlc-static, to fix tests

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

 Makefile.am     |    4 ++++
 bin/Makefile.am |   10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 3c7831a..d0ca19a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -973,7 +973,11 @@ noinst_SCRIPTS = vlc$(EXEEXT)
 endif
 
 vlc$(EXEEXT):
+if HAVE_DARWIN
+	$(AM_V_GEN)$(LN_S) -f bin/vlc-osx-static vlc
+else
 	$(AM_V_GEN)$(LN_S) -f bin/vlc-static$(EXEEXT) vlc$(EXEEXT)
+endif
 
 TESTS = test/run_vlc.sh
 dist_noinst_SCRIPTS += test/run_vlc.sh
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 14bbc28..6033e50 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -2,6 +2,7 @@
 #
 if HAVE_DARWIN
 bin_PROGRAMS = vlc-osx
+noinst_PROGRAMS = vlc-osx-static
 else
 bin_PROGRAMS = vlc
 noinst_PROGRAMS = vlc-static
@@ -31,10 +32,19 @@ if HAVE_WIN32
 vlc_SOURCES = winvlc.c
 noinst_DATA += vlc_win32_rc.rc
 endif
+
 if HAVE_DARWIN
 vlc_osx_SOURCES = darwinvlc.m
 vlc_osx_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,CoreFoundation,-framework,Cocoa
 vlc_osx_LDADD = ../lib/libvlc.la
+
+vlc_osx_static_SOURCES = $(vlc_osx_SOURCES)
+vlc_osx_static_OBJCFLAGS = $(AM_OBJCFLAGS) \
+	-DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
+	-DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
+	$(NULL)
+vlc_osx_static_LDFLAGS = $(vlc_osx_LDFLAGS) -static
+vlc_osx_static_LDADD = $(vlc_osx_LDADD)
 endif
 
 vlc_wrapper_SOURCES = rootwrap.c



More information about the vlc-commits mailing list