-
Notifications
You must be signed in to change notification settings - Fork 36
Compiling on OS X
aimmac23 edited this page Jun 20, 2014
·
2 revisions
I'd like to thank Apple for making this as non-standard as possible.
Wisdom from here: http://dssheep.blogspot.co.uk/2011/11/how-to-avoid-dyldlibrarypath-with-jni.html
Apply the same hack to allow compiling shared libraries in the configure script
LD_NOMAP=true ./configure --enable-shared --target=x86_64-darwin9-gcc
@echo " [HACK] libvpx.dylib"
$(qexec)$$(CC) $$? -o libvpx.dylib -dynamiclib '-W',-install_name,@rpath/libvpx.dylib'
I'm not sure the LD_NOMAP was required in the end.
gcc webmenc.c third_party/libmkv/EbmlWriter.c -o libmkv.dylib -dynamiclib -I . -L . -lvpx -mmacosx-version-min=10.5 '-W',-install_name,@rpath/libmkv.dylib'
CXXFLAGS="-O2 -mmacosx-version-min=10.5" make -f linux.mk
gcc source/*.o -o libyuv.dylib -dynamiclib -mmacosx-version-min=10.5 '-Wl,-install_name,@rpath/libyuv.dylib'
gcc src/main/c/encoder_interface.c -o libinterface.dylib -dynamiclib -I ../libvpx-v1.3.0/ -I ../libyuv/trunk/include -L binaries/64bit/ -lvpx -lmkv -lyuv -mmacosx-version-min=10.5