blob: 0e43c858fffe1edb8be68897895aa4bc46024c82 [file] [log] [blame]
DRCadadd9d2010-01-08 11:17:36 +00001#!/bin/sh
2# This script wraps build-xorg-7.4 to enable building a version of TigerVNC
3# which is compatible across Linux distributions. It is identical to
4# build-compat-linux, except that it adds the necessary arguments to cross-
5# compile a 32-bit version of TigerVNC on a 64-bit system.
6
7set -e
8
9if [ "$1" = "" ]; then
10 echo USAGE: $0 init \| build \| update
11 exit 0
12fi
13
14SCRIPTDIR=`dirname $0`
15pushd $SCRIPTDIR/../unix
16if [ ! -d ./xorg.build/lib ]; then
17 mkdir -p ./xorg.build/lib
18fi
19CFLAGS='-m32 -O3 -static-libgcc'
20CXXFLAGS=$CFLAGS
21LDFLAGS=$CFLAGS' -L'`pwd`'/xorg.build/lib'
22export CFLAGS
23export CXXFLAGS
24export LDFLAGS
25if [ -f ./xorg.build/lib/libstdc++.a ]; then
26 rm -f ./xorg.build/lib/libstdc++.a
27fi
28ln -fs `gcc $CFLAGS -print-file-name=libstdc++.a` ./xorg.build/lib
29if [ -f ./xorg.build/lib/libcrypto.a ]; then
30 rm -f ./xorg.build/lib/libcrypto.a
31fi
32ln -fs /usr/lib/libcrypto.a ./xorg.build/lib
33. build-xorg-7.4 $1 -static --host i686-pc-linux-gnu
34popd