mirror of
https://github.com/brain-hackers/cegcc-build.git
synced 2024-12-22 20:20:08 +09:00
build-mingw32ce.sh: add shell function "configure_module"
This commit is contained in:
parent
6458422259
commit
872c249d2b
@ -182,18 +182,45 @@ if [ -d ${BUILD_DIR}/.svn ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# configure_module MODULE SUBDIR [configure-arguments ...]
|
||||||
|
function configure_module()
|
||||||
|
{
|
||||||
|
local module="$1"
|
||||||
|
local subdir="$2"
|
||||||
|
shift 2
|
||||||
|
|
||||||
|
src="${BASE_DIRECTORY}/${module}"
|
||||||
|
|
||||||
|
mkdir -p $subdir
|
||||||
|
cd $subdir
|
||||||
|
|
||||||
|
$src/configure \
|
||||||
|
--prefix=${PREFIX} \
|
||||||
|
--build=${BUILD} \
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
function configure_host_module()
|
||||||
|
{
|
||||||
|
configure_module "$@" \
|
||||||
|
--host=${HOST} \
|
||||||
|
--target=${TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
|
function configure_target_module()
|
||||||
|
{
|
||||||
|
configure_module "$@" \
|
||||||
|
--host=${TARGET} \
|
||||||
|
--target=${TARGET}
|
||||||
|
}
|
||||||
|
|
||||||
build_binutils()
|
build_binutils()
|
||||||
{
|
{
|
||||||
echo ""
|
echo ""
|
||||||
echo "BUILDING BINUTILS --------------------------"
|
echo "BUILDING BINUTILS --------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
mkdir -p binutils
|
configure_host_module binutils binutils \
|
||||||
cd binutils
|
|
||||||
${BASE_DIRECTORY}/binutils/configure \
|
|
||||||
--prefix=${PREFIX} \
|
|
||||||
--host=${HOST} \
|
|
||||||
--target=${TARGET} \
|
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-werror
|
--disable-werror
|
||||||
|
|
||||||
@ -205,17 +232,10 @@ build_binutils()
|
|||||||
|
|
||||||
build_bootstrap_gcc()
|
build_bootstrap_gcc()
|
||||||
{
|
{
|
||||||
mkdir -p gcc-bootstrap
|
configure_host_module $gcc_src gcc-bootstrap \
|
||||||
cd gcc-bootstrap
|
|
||||||
|
|
||||||
${BASE_DIRECTORY}/${gcc_src}/configure \
|
|
||||||
--with-gcc \
|
--with-gcc \
|
||||||
--with-gnu-ld \
|
--with-gnu-ld \
|
||||||
--with-gnu-as \
|
--with-gnu-as \
|
||||||
--target=${TARGET} \
|
|
||||||
--build=${BUILD} \
|
|
||||||
--host=${HOST} \
|
|
||||||
--prefix=${PREFIX} \
|
|
||||||
--disable-threads \
|
--disable-threads \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--enable-languages=c \
|
--enable-languages=c \
|
||||||
@ -246,12 +266,7 @@ build_bootstrap_gcc()
|
|||||||
|
|
||||||
build_w32api()
|
build_w32api()
|
||||||
{
|
{
|
||||||
mkdir -p w32api
|
configure_target_module w32api w32api
|
||||||
cd w32api
|
|
||||||
|
|
||||||
${BASE_DIRECTORY}/w32api/configure \
|
|
||||||
--host=${TARGET} \
|
|
||||||
--prefix=${PREFIX}
|
|
||||||
|
|
||||||
make ${PARALLELISM}
|
make ${PARALLELISM}
|
||||||
make install
|
make install
|
||||||
@ -288,13 +303,7 @@ build_w32api()
|
|||||||
|
|
||||||
build_mingw()
|
build_mingw()
|
||||||
{
|
{
|
||||||
mkdir -p mingw
|
configure_target_module mingw mingw
|
||||||
cd mingw
|
|
||||||
${BASE_DIRECTORY}/mingw/configure \
|
|
||||||
--build=${BUILD} \
|
|
||||||
--host=${TARGET} \
|
|
||||||
--target=${TARGET} \
|
|
||||||
--prefix=${PREFIX}
|
|
||||||
|
|
||||||
make ${PARALLELISM}
|
make ${PARALLELISM}
|
||||||
make install
|
make install
|
||||||
@ -304,17 +313,10 @@ build_mingw()
|
|||||||
|
|
||||||
build_gcc()
|
build_gcc()
|
||||||
{
|
{
|
||||||
mkdir -p gcc
|
configure_host_module ${gcc_src} gcc \
|
||||||
cd gcc
|
|
||||||
|
|
||||||
${BASE_DIRECTORY}/${gcc_src}/configure \
|
|
||||||
--with-gcc \
|
--with-gcc \
|
||||||
--with-gnu-ld \
|
--with-gnu-ld \
|
||||||
--with-gnu-as \
|
--with-gnu-as \
|
||||||
--build=${BUILD} \
|
|
||||||
--target=${TARGET} \
|
|
||||||
--host=${HOST} \
|
|
||||||
--prefix=${PREFIX} \
|
|
||||||
--enable-threads=win32 \
|
--enable-threads=win32 \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--enable-languages=c,c++ \
|
--enable-languages=c,c++ \
|
||||||
@ -347,15 +349,10 @@ build_gdb()
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
mkdir -p gdb
|
configure_host_module gdb gdb \
|
||||||
cd gdb
|
|
||||||
|
|
||||||
${BASE_DIRECTORY}/gdb/configure \
|
|
||||||
--with-gcc \
|
--with-gcc \
|
||||||
--with-gnu-ld \
|
--with-gnu-ld \
|
||||||
--with-gnu-as \
|
--with-gnu-as \
|
||||||
--target=${TARGET} \
|
|
||||||
--prefix=${PREFIX} \
|
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
--disable-win32-registry \
|
--disable-win32-registry \
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
@ -377,13 +374,7 @@ build_gdbserver()
|
|||||||
echo ""
|
echo ""
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
mkdir -p gdbserver
|
configure_target_module gdb/gdbserver gdbserver
|
||||||
cd gdbserver
|
|
||||||
|
|
||||||
${BASE_DIRECTORY}/gdb/gdbserver/configure \
|
|
||||||
--target=${TARGET} \
|
|
||||||
--host=${TARGET} \
|
|
||||||
--prefix=${PREFIX} \
|
|
||||||
|
|
||||||
make ${PARALLELISM}
|
make ${PARALLELISM}
|
||||||
make install
|
make install
|
||||||
@ -425,11 +416,7 @@ build_profile()
|
|||||||
mkdir -p profile
|
mkdir -p profile
|
||||||
cd profile
|
cd profile
|
||||||
|
|
||||||
${BASE_DIRECTORY}/profile/configure \
|
configure_target_module profile profile
|
||||||
--build=${BUILD} \
|
|
||||||
--host=${TARGET} \
|
|
||||||
--target=${TARGET} \
|
|
||||||
--prefix=${PREFIX}
|
|
||||||
|
|
||||||
make ${PARALLELISM}
|
make ${PARALLELISM}
|
||||||
make install
|
make install
|
||||||
|
Loading…
Reference in New Issue
Block a user