diff options
-rw-r--r-- | xdelta3/Makefile.am | 4 | ||||
-rwxr-xr-x | xdelta3/run_release.sh | 55 |
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. |
40 | WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \ | 40 | WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \ |
41 | -Wextra -Wno-unused-parameter | 41 | -Wextra -Wno-unused-parameter -Wno-unused-function |
42 | 42 | ||
43 | C_WFLAGS = $(WFLAGS) -pedantic -std=c99 | 43 | C_WFLAGS = $(WFLAGS) -pedantic -std=c99 |
44 | CXX_WFLAGS = $(WFLAGS) | 44 | CXX_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 | ||
54 | if DEBUG_SYMBOLS | 53 | if 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 | ||
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 | |||