Created
March 14, 2014 15:30
-
-
Save tappleby/9550058 to your computer and use it in GitHub Desktop.
Cross compile JQ for windows
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
#!/bin/sh | |
# Modified version of: https://github.com/svnpenn/a/blob/e06ea1e/scripts/install-jq.sh | |
# up to date Windows native jq | |
# autoconf need for autoreconf | |
# automake need for autoreconf > aclocal | |
# libtool need for autoreconf > libtool | |
# bison need for make | |
# flex need for make | |
pacman -S autoconf automake bison flex libtool | |
rm -rf jq | |
git clone --depth 1 git://github.com/stedolan/jq | |
cd jq | |
export CC=i586-mingw32msvc-gcc | |
export CXX=i586-mingw32msvc-c++ | |
export LD=i586-mingw32msvc-ld | |
export AR=i586-mingw32msvc-ar | |
export AS=i586-mingw32msvc-as | |
export NM=i586-mingw32msvc-nm | |
export STRIP=i586-mingw32msvc-strip | |
export RANLIB=i586-mingw32msvc-ranlib | |
export DLLTOOL=i586-mingw32msvc-dlltool | |
export OBJDUMP=i586-mingw32msvc-objdump | |
export RESCOMP=i586-mingw32msvc-windres | |
export WINDRES=i586-mingw32msvc-windres | |
MINGWFLAGS="-std=c99 " | |
CFLAGS="$MINGWFLAGS" | |
CXXFLAGS="$MINGWFLAGS" | |
autoreconf -i | |
./configure --target=i586-mingw32msvc --host=i586 | |
make -j4 LDFLAGS=-all-static CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment