summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xdelta3/Makefile.am4
-rwxr-xr-xxdelta3/run_release.sh55
2 files changed, 56 insertions, 3 deletions
diff --git a/xdelta3/Makefile.am b/xdelta3/Makefile.am
index 94fce8a..2bfb7eb 100644
--- a/xdelta3/Makefile.am
+++ b/xdelta3/Makefile.am
@@ -38,7 +38,7 @@ xdelta3regtest_SOURCES = $(common_SOURCES) \
38# Note: for extra sanity checks, enable -Wconversion. Note there 38# Note: for extra sanity checks, enable -Wconversion. Note there
39# are a lot of false positives. 39# are a lot of false positives.
40WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \ 40WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \
41 -Wextra -Wno-unused-parameter 41 -Wextra -Wno-unused-parameter -Wno-unused-function
42 42
43C_WFLAGS = $(WFLAGS) -pedantic -std=c99 43C_WFLAGS = $(WFLAGS) -pedantic -std=c99
44CXX_WFLAGS = $(WFLAGS) 44CXX_WFLAGS = $(WFLAGS)
@@ -48,7 +48,6 @@ common_CFLAGS = \
48 -DSECONDARY_DJW=1 \ 48 -DSECONDARY_DJW=1 \
49 -DSECONDARY_FGK=1 \ 49 -DSECONDARY_FGK=1 \
50 -DXD3_POSIX=1 \ 50 -DXD3_POSIX=1 \
51 -DXD3_USE_LARGEFILE64=1 \
52 -DXD3_MAIN=1 51 -DXD3_MAIN=1
53 52
54if DEBUG_SYMBOLS 53if DEBUG_SYMBOLS
@@ -65,7 +64,6 @@ xdelta3decode_CFLAGS = \
65 -DSECONDARY_DJW=0 \ 64 -DSECONDARY_DJW=0 \
66 -DSECONDARY_FGK=0 \ 65 -DSECONDARY_FGK=0 \
67 -DSECONDARY_LZMA=0 \ 66 -DSECONDARY_LZMA=0 \
68 -DXD3_USE_LARGEFILE64=1 \
69 -DXD3_MAIN=1 \ 67 -DXD3_MAIN=1 \
70 -DXD3_ENCODER=0 \ 68 -DXD3_ENCODER=0 \
71 -DXD3_STDIO=1 \ 69 -DXD3_STDIO=1 \
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