Created
June 6, 2019 14:34
-
-
Save JCash/ac7360de5cb161aaaba7eafb1fecedec to your computer and use it in GitHub Desktop.
A simple way to compile the WebP encoder, since the vanilla makefiles fail on OSX
This file contains hidden or 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
#!/usr/bin/env bash | |
CC=clang | |
CCFLAGS="-c -I./libwebp-1.0.2" | |
function compile { | |
local DIR=$1 | |
local NAME=$2 | |
for file in `ls $DIR/*.c`; do | |
echo $file | |
${CC} ${CCFLAGS} $file | |
done | |
ar -rcs $NAME *.o | |
echo "Wrote" $NAME | |
} | |
compile ./libwebp-1.0.2/src/enc libwebpencode.a | |
compile ./libwebp-1.0.2/src/dsp libwebpdsp.a | |
compile ./libwebp-1.0.2/src/utils libwebputils.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment