From a2e999beec49f222ab30006121eb84d8f9548fbb Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Mon, 9 Mar 2015 23:00:16 -0700 Subject: run_release.sh copied / modified from 64-bithash branch --- xdelta3/Makefile.am | 4 +--- xdelta3/run_release.sh | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100755 xdelta3/run_release.sh (limited to 'xdelta3') 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) \ # Note: for extra sanity checks, enable -Wconversion. Note there # are a lot of false positives. WFLAGS = -Wall -Wshadow -fno-builtin -Wextra -Wsign-compare \ - -Wextra -Wno-unused-parameter + -Wextra -Wno-unused-parameter -Wno-unused-function C_WFLAGS = $(WFLAGS) -pedantic -std=c99 CXX_WFLAGS = $(WFLAGS) @@ -48,7 +48,6 @@ common_CFLAGS = \ -DSECONDARY_DJW=1 \ -DSECONDARY_FGK=1 \ -DXD3_POSIX=1 \ - -DXD3_USE_LARGEFILE64=1 \ -DXD3_MAIN=1 if DEBUG_SYMBOLS @@ -65,7 +64,6 @@ xdelta3decode_CFLAGS = \ -DSECONDARY_DJW=0 \ -DSECONDARY_FGK=0 \ -DSECONDARY_LZMA=0 \ - -DXD3_USE_LARGEFILE64=1 \ -DXD3_MAIN=1 \ -DXD3_ENCODER=0 \ -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 @@ +#!/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 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} bits, + echo For xoff_t=${offsetbits} bits. + + echo "Configuring $D ..." + (cd $D && $SRCDIR/configure --prefix=$PWD/bin --enable-debug-symbols) + (cd $D && make all) +} + +function buildall { + buildit $1 32 "-DXD3_USE_LARGEFILE64=0" + buildit $1 64 "-DXD3_USE_LARGEFILE64=1" +} + +buildall m64 +buildall m32 + + + -- cgit v1.2.3