summaryrefslogtreecommitdiff
path: root/xdelta3/run_release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xdelta3/run_release.sh')
-rwxr-xr-xxdelta3/run_release.sh55
1 files changed, 55 insertions, 0 deletions
diff --git a/xdelta3/run_release.sh b/xdelta3/run_release.sh
new file mode 100755
index 0000000..22a1dcc
--- /dev/null
+++ b/xdelta3/run_release.sh
@@ -0,0 +1,55 @@
1#!/bin/sh
2
3# Choose
4CC=clang
5CXX=clang++
6# or
7#CC=gcc
8#CXX=g++
9
10# Place C/C++ common flags here
11COMMON="-g"
12
13export CFLAGS
14export CXXFLAGS
15export CC
16export CXX
17export LDFLAGS
18
19LIBBASE=$HOME/lib
20
21# Run from the source dir.
22SRCDIR=$PWD
23
24rm -rf build
25
26function buildit {
27 machine=$1
28 offsetbits=$2
29 args=$3
30 D=build/${machine}/xoff${offsetbits}
31 CFLAGS="$COMMON -${machine} ${args} -I$LIBBASE/${machine}/include"
32 CXXFLAGS="$COMMON -${machine} ${args} -I$LIBBASE/${machine}/include"
33 LDFLAGS="$COMMON -${machine} ${args} -L$LIBBASE/${machine}/lib"
34 echo CFLAGS=$CFLAGS
35 echo CXXFLAGS=$CXXFLAGS
36 echo LDFLAGS=$LDFLAGS
37 mkdir -p $D
38 echo For machine=${machine} bits,
39 echo For xoff_t=${offsetbits} bits.
40
41 echo "Configuring $D ..."
42 (cd $D && $SRCDIR/configure --prefix=$PWD/bin --enable-debug-symbols)
43 (cd $D && make all)
44}
45
46function buildall {
47 buildit $1 32 "-DXD3_USE_LARGEFILE64=0"
48 buildit $1 64 "-DXD3_USE_LARGEFILE64=1"
49}
50
51buildall m64
52buildall m32
53
54
55