diff --git a/Makefile.am b/Makefile.am index 3c7831a3887a..d0ca19abc835 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 14bbc28fcad4..6033e502d4e3 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