1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00
stedolan-jq/scripts/crosscompile

38 lines
688 B
Plaintext
Raw Normal View History

#!/bin/sh
# This script is used to cross-compile binaries for
# platforms other than the current one
# Usage: $0 <platformname> <configure options>
# <platformname> is arbitrary, it is the name
# of the directory which will be created to contain
# the output binaries.
# e.g. $0 win32 --host=i686-w64-mingw32
set -e
cd `dirname "$0"`/../build
2014-06-04 18:15:44 -05:00
jobs=-j4
case "X$1" in
X-j*) jobs=$1; shift;;
esac
plat="$1"
[ -z "$plat" ] && exit 1
shift
[ -d "$plat" ] || mkdir "$plat"
rm -rf "$plat/tmp"
mkdir "$plat/tmp"
cd "$plat/tmp"
mkdir install_other
../../../configure \
--prefix="`pwd`/install_other" \
--bindir="`pwd`/.." \
"$@"
2014-06-04 18:15:44 -05:00
make "$jobs" install-binaries
cd ..
2014-06-04 18:15:44 -05:00
rm -rf tmp