diff options
Diffstat (limited to 'xdelta3/run_release.sh')
-rwxr-xr-x | xdelta3/run_release.sh | 55 |
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 | ||
4 | CC=clang | ||
5 | CXX=clang++ | ||
6 | # or | ||
7 | #CC=gcc | ||
8 | #CXX=g++ | ||
9 | |||
10 | # Place C/C++ common flags here | ||
11 | COMMON="-g" | ||
12 | |||
13 | export CFLAGS | ||
14 | export CXXFLAGS | ||
15 | export CC | ||
16 | export CXX | ||
17 | export LDFLAGS | ||
18 | |||
19 | LIBBASE=$HOME/lib | ||
20 | |||
21 | # Run from the source dir. | ||
22 | SRCDIR=$PWD | ||
23 | |||
24 | rm -rf build | ||
25 | |||
26 | function 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 | |||
46 | function buildall { | ||
47 | buildit $1 32 "-DXD3_USE_LARGEFILE64=0" | ||
48 | buildit $1 64 "-DXD3_USE_LARGEFILE64=1" | ||
49 | } | ||
50 | |||
51 | buildall m64 | ||
52 | buildall m32 | ||
53 | |||
54 | |||
55 | |||