blob: be7e1794715bc535ea9dae5432a291c788f6b682 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/bin/sh
# Choose
CC=clang
CXX=clang++
# or
#CC=gcc
#CXX=g++
# Place C/C++ common flags here
COMMON="-g"
export CFLAGS
export CXXFLAGS
export CC
export CXX
export LDFLAGS
LIBBASE=$HOME/lib
# Run from the source dir.
SRCDIR=$PWD
rm -rf build
function setup {
aclocal -I m4
automake
automake --add-missing
autoconf
}
function buildit {
machine=$1
offsetbits=$2
args=$3
D=build/${machine}/xoff${offsetbits}
CFLAGS="$COMMON -${machine} ${args} -I$LIBBASE/${machine}/include"
CXXFLAGS="$COMMON -${machine} ${args} -I$LIBBASE/${machine}/include"
LDFLAGS="$COMMON -${machine} ${args} -L$LIBBASE/${machine}/lib"
echo CFLAGS=$CFLAGS
echo CXXFLAGS=$CXXFLAGS
echo LDFLAGS=$LDFLAGS
mkdir -p $D
echo For machine=${machine}
echo For xoff_t=${offsetbits} bits
echo "Configuring $D ..."
(cd $D && $SRCDIR/configure --prefix=$PWD/bin --enable-debug-symbols)
echo "Configuring $D ..."
(cd $D && make all)
echo "Testing $D ..."
(cd $D && ./xdelta3 test)
}
function buildall {
buildit $1 32 "-DXD3_USE_LARGEFILE64=0"
buildit $1 64 "-DXD3_USE_LARGEFILE64=1"
}
buildall m64
buildall m32
|