in 2003 Google's build system was moved from a single Makefile to a per-directory design with better-managed, more explicit dependencies. A typical binary shrank about 40% in file size, just from having more accurate dependencies recorded.
Rob Pike

seen from United States
seen from China

seen from Netherlands

seen from Sweden

seen from Netherlands
seen from United States
seen from Italy
seen from Netherlands
seen from China
seen from China
seen from China
seen from United Kingdom
seen from United States
seen from Brazil
seen from China
seen from Poland
seen from China

seen from United States
seen from United Kingdom
seen from United States
in 2003 Google's build system was moved from a single Makefile to a per-directory design with better-managed, more explicit dependencies. A typical binary shrank about 40% in file size, just from having more accurate dependencies recorded.
Rob Pike

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
If you are creating an external bundle on OSX that uses another dynamic library you will find some special issues. In particular, you may find that the external works from within XCode but doesn't work from a rev stack outside the XCode environment. In my case, I had a third-party dynamic library with a well-defined api. I wrote the code to wrap the api calls and everything worked fine from the "Build and Go" mode of XCode: my code compiled and linked properly, then XCode launched Revolution with my test stack and all my functions worked properly. But when I launched my test stack by double-clicking or opening from the IDE, my external library didn't load.
Embed ffmpeg with dylibs into your app bundle
In one of my projects I needed ffmpeg to be included in the app bundle. I didn't wanted to build it on my own, so I googled for a static compiled binary and, actually, found it. Great, it's working. But not for long, my laziness is my enemy =)
At some point I realized I need ffprobe tool also. So, should I embed ffprobe static build too? No, absolutely not, 60 MB of distribution size? No way, sir.
I need to include ffmpeg+ffprobe+dylibs into my bundle, it's obvious. I, actually, built it with help of guide I mentioned above. But then I thought: what if there is a simplier way for osx developers. I had a ffmpeg installed already by brew. It's incredibly easy to reconfigure it without dealing with make&install ever. What if I could use those binaries in my app? The bad news is those binares were linked against absolute paths.
After some googling, I've found the solution: use install_name_tool to change those absolute paths to @executable_path! With help of otool -L we can get the list of dylibs paths that should be replaced. So, I've made a shell script that does that and viola! My tool uses dynamicly built ffmpeg and ffprobe, problem solved :)
Here is the script (I've made a github gist also, you can thack the changes, if any):
#install ffmpeg if it is not installed (brew list -1 | grep "ffmpeg" >/dev/null) || brew install ffmpeg #update your ffmpeg distribution to the latest version brew outdated ffmpeg || brew upgrade ffmpeg #cleanup the destination folder for file in `ls ffmpeg/*`; do rm -f $file; done; #determine the last local ffmpeg version COPY_FROM_PATH="" for ffmpeg_path in `brew info ffmpeg | grep 'Cellar/ffmpeg/.*\*' | awk -F' ' '{ print $1 }'`; do COPY_FROM_PATH="$(echo $ffmpeg_path)"; done; #copy all the binaries for source in `find $COPY_FROM_PATH/bin -type f`; do cp -v -f $source ./ffmpeg; done; #I need ffprobe and ffmpeg only, so I remove ffserver here. If you need it - comment this line cd ffmpeg && rm -f ffserver && cd .. #replace references to an absolute path with @executable_path #which will allow to run ffmpeg that loads dylibs from the bundle function replace_dlybs() { DYLIBS=`otool -L $1 | grep "/usr/local/Cellar" | awk -F' ' '{print \$1 }'` for dylib in $DYLIBS; do sudo install_name_tool -change $dylib @executable_path/`basename $dylib` $1; done; for dylib in $DYLIBS; do cp -f -n $dylib ./ffmpeg; done; DYLIBS=`otool -L $1 | grep "/usr/local/opt" | awk -F' ' '{print \$1 }'` for dylib in $DYLIBS; do sudo install_name_tool -change $dylib @executable_path/`basename $dylib` $1; done; for dylib in $DYLIBS; do cp -f -n $dylib ./ffmpeg; done; sudo install_name_tool -id @executable_path/`basename $dylib` $1 } #first replace occurences in ffmpeg and ffprobe binaries for file in `ls ffmpeg/*`; do echo replacing dylibs for $file replace_dlybs $file done; #then replace occurrences in all the additional dylibs that were copied in the previous step for file in `ls ffmpeg/*.dylib`; do echo replacing dylibs for $file replace_dlybs $file done;
This hack could be used on any other binaries. So, when I'll need to embed, say, imagemagick toolset - I'll know what to do ;)
link glfw3 on mac
I need this cmake argument to output dylib files
cmake -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="i386;x86_64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang ../
Charlie Miller demonstrates how an innocent application from the AppStore can download an unsigned dylib at run-time and execute code on the device that Apple has not had the chance to review.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming