mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 08:59:28 +02:00
Abstract out the architecture in build_wxwidgets script
This commit is contained in:
parent
93bf8d1754
commit
fe19c848be
@ -23,25 +23,6 @@ fi
|
|||||||
|
|
||||||
max=${min/./}0
|
max=${min/./}0
|
||||||
ver="-DMAC_OS_X_VERSION_MAX_ALLOWED=${max} -mmacosx-version-min=${min}"
|
ver="-DMAC_OS_X_VERSION_MAX_ALLOWED=${max} -mmacosx-version-min=${min}"
|
||||||
arch='-arch i386'
|
|
||||||
|
|
||||||
std=''
|
|
||||||
stdlib='-stdlib=libstdc++'
|
|
||||||
if [ ${max} -gt 1060 ]
|
|
||||||
then
|
|
||||||
std='-std=c++1z'
|
|
||||||
stdlib='-stdlib=libc++'
|
|
||||||
fi
|
|
||||||
|
|
||||||
export CPPFLAGS="${ver}"
|
|
||||||
export CFLAGS1="$arch ${ver} -isysroot $sdk"
|
|
||||||
export CXXFLAGS1="$arch ${ver} -isysroot $sdk ${std} ${stdlib}"
|
|
||||||
export LDFLAGS1="$arch ${ver} -syslibroot,$sdk ${std} ${stdlib}"
|
|
||||||
|
|
||||||
# Make sure our flags are included
|
|
||||||
export CC="gcc $CFLAGS1"
|
|
||||||
export CXX="g++ $CXXFLAGS1"
|
|
||||||
export LD="g++ $LDFLAGS1"
|
|
||||||
|
|
||||||
# Build a specific configuration
|
# Build a specific configuration
|
||||||
function bld
|
function bld
|
||||||
@ -51,7 +32,10 @@ function bld
|
|||||||
pushd "${1}"
|
pushd "${1}"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
../configure --enable-macosx-arch=i386 \
|
arch_option="--enable-macosx-arch=${1}"
|
||||||
|
shift
|
||||||
|
|
||||||
|
../configure ${arch_option} \
|
||||||
--with-expat=builtin \
|
--with-expat=builtin \
|
||||||
--with-zlib=builtin \
|
--with-zlib=builtin \
|
||||||
--with-regex=builtin \
|
--with-regex=builtin \
|
||||||
@ -74,10 +58,33 @@ function inst
|
|||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build all configurations
|
for architecture in 'i386'; do {
|
||||||
bld bld_debug --enable-debug=yes --enable-shared=yes --with-flavour=debug
|
std=''
|
||||||
bld bld_release --enable-debug=no --enable-shared=yes --with-flavour=release
|
stdlib='-stdlib=libstdc++'
|
||||||
|
if [ ${max} -gt 1060 ]
|
||||||
|
then
|
||||||
|
std='-std=c++1z'
|
||||||
|
stdlib='-stdlib=libc++'
|
||||||
|
fi
|
||||||
|
|
||||||
# Install all configurations
|
arch="-arch ${architecture}"
|
||||||
inst bld_debug
|
export CPPFLAGS="${ver}"
|
||||||
inst bld_release
|
export CFLAGS1="${arch} ${ver} -isysroot $sdk"
|
||||||
|
export CXXFLAGS1="${arch} ${ver} -isysroot $sdk ${std} ${stdlib}"
|
||||||
|
export LDFLAGS1="${arch} ${ver} -syslibroot,$sdk ${std} ${stdlib}"
|
||||||
|
|
||||||
|
# Make sure our flags are included
|
||||||
|
export CC="gcc $CFLAGS1"
|
||||||
|
export CXX="g++ $CXXFLAGS1"
|
||||||
|
export LD="g++ $LDFLAGS1"
|
||||||
|
|
||||||
|
# Build all configurations
|
||||||
|
debug_dir="bld_debug_${architecture}"
|
||||||
|
release_dir="bld_release_${architecture}"
|
||||||
|
bld ${debug_dir} ${architecture} --enable-debug=yes --enable-shared=yes --with-flavour=debug
|
||||||
|
bld ${release_dir} ${architecture} --enable-debug=no --enable-shared=yes --with-flavour=release
|
||||||
|
|
||||||
|
# Install all configurations
|
||||||
|
inst ${debug_dir}
|
||||||
|
inst ${release_dir}
|
||||||
|
}; done # loop over architectures
|
||||||
|
Loading…
x
Reference in New Issue
Block a user