summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2013-05-11 14:57:58 +0100
committerStephen Dolan <mu@netsoc.tcd.ie>2013-05-11 14:57:58 +0100
commit4a5405e4b824b9f935f3f398c53fb83b8d07a15c (patch)
tree2ce3069f0c6de9122ed8e5ce3a3e06da95c10227 /scripts
parentd03149f4df5c91c16c77d5bda89cdcf724113544 (diff)
Rake task to build website including source dist and binaries.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/crosscompile31
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/crosscompile b/scripts/crosscompile
new file mode 100755
index 00000000..7ee086b7
--- /dev/null
+++ b/scripts/crosscompile
@@ -0,0 +1,31 @@
+#!/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
+
+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`/.." \
+ "$@"
+make install-binaries
+cd ..
+rm -rf tmp \ No newline at end of file