Created
January 30, 2014 10:31
-
-
Save r10r/8705995 to your computer and use it in GitHub Desktop.
Generate CFLAGS from libraries installed through homebrew.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
brew_cflags() { | |
local flags | |
for lib in $@; do | |
P=`brew --prefix $lib` | |
name=`echo $lib | sed 's/^lib//'` | |
flags="$flags -L$P/lib -I$P/include -l$name" | |
done | |
echo $flags | |
} | |
brew_cflags "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment