mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
take control of Allwmake scripts for third-party sources
- this improves the chances of having a current version
This commit is contained in:
3
Allwmake
3
Allwmake
@ -6,8 +6,9 @@ set -x
|
|||||||
( cd wmake/src && make )
|
( cd wmake/src && make )
|
||||||
|
|
||||||
# build ThirdParty sources
|
# build ThirdParty sources
|
||||||
( cd $WM_THIRD_PARTY_DIR && ./Allwmake )
|
$WM_PROJECT_DIR/bin/tools/AllwmakeThirdParty
|
||||||
|
|
||||||
|
# build OpenFOAM libraries and applications
|
||||||
src/Allwmake
|
src/Allwmake
|
||||||
applications/Allwmake
|
applications/Allwmake
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,8 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
|
||||||
# build libccmio and create lnInclude directory
|
# build libccmio and create lnInclude directory
|
||||||
( cd $WM_THIRD_PARTY_DIR && ./AllwmakeLibccmio )
|
$WM_PROJECT_DIR/bin/tools/AllwmakeLibccmio
|
||||||
|
|
||||||
# if the library built properly, the headers should exist too
|
# if the library built properly, the headers should exist too
|
||||||
if [ -e $FOAM_LIBBIN/libccmio.so ]
|
if [ -e $FOAM_LIBBIN/libccmio.so ]
|
||||||
|
|||||||
50
bin/tools/AllwcleanThirdParty
Executable file
50
bin/tools/AllwcleanThirdParty
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# AllwcleanThirdParty
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Distribution clean script for ThirdParty
|
||||||
|
#
|
||||||
|
# Still somewhat incomplete
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
[ -d "$WM_THIRD_PARTY_DIR" ] || {
|
||||||
|
echo "no \$WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
cd $WM_THIRD_PARTY_DIR || exit 1 # run from third-party directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
rm -rf gcc-4.3.3/build
|
||||||
|
rm -rf gmp-4.2.4/build
|
||||||
|
rm -rf mpfr-2.4.1/build
|
||||||
|
|
||||||
|
( cd metis-5.0pre2 && make distclean )
|
||||||
|
( cd openmpi-1.3.3 && make distclean )
|
||||||
|
( cd paraview-3.6.1 && make distclean )
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
70
bin/tools/AllwmakeLibccmio
Executable file
70
bin/tools/AllwmakeLibccmio
Executable file
@ -0,0 +1,70 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# AllwmakeLibccmio
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Get and build CD-adapco's ccmio library
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
packageDir=libccmio-2.6.1
|
||||||
|
|
||||||
|
[ -d "$WM_THIRD_PARTY_DIR" ] || {
|
||||||
|
echo "no \$WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
cd $WM_THIRD_PARTY_DIR || exit 1 # run from third-party directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ ! -d ${packageDir} ]
|
||||||
|
then
|
||||||
|
if [ ! -e ${packageDir}.tar.gz ]
|
||||||
|
then
|
||||||
|
wget --no-check-certificate \
|
||||||
|
https://wci.llnl.gov/codes/visit/3rd_party/${packageDir}.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e ${packageDir}.tar.gz ]
|
||||||
|
then
|
||||||
|
tar -xzf ${packageDir}.tar.gz
|
||||||
|
else
|
||||||
|
echo "no ${packageDir}.tar.gz to unpack"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ${packageDir} -a ! -d ${packageDir}/Make ]
|
||||||
|
then
|
||||||
|
cp -r wmakeFiles/libccmio ${packageDir}/Make
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d ${packageDir}/Make ]
|
||||||
|
then
|
||||||
|
wmake libso ${packageDir}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
194
bin/tools/AllwmakeThirdParty
Executable file
194
bin/tools/AllwmakeThirdParty
Executable file
@ -0,0 +1,194 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# AllwmakeThirdParty
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for ThirdParty sources
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[ -d "$WM_THIRD_PARTY_DIR" ] || {
|
||||||
|
echo "no \$WM_THIRD_PARTY_DIR=$WM_THIRD_PARTY_DIR"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
cd $WM_THIRD_PARTY_DIR || exit 1 # run from third-party directory
|
||||||
|
set -x
|
||||||
|
|
||||||
|
|
||||||
|
# export WM settings in a form that GNU configure recognizes
|
||||||
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||||
|
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
|
||||||
|
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
|
||||||
|
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
|
||||||
|
|
||||||
|
wmake libso zlib-1.2.3
|
||||||
|
( cd malloc && ./Allwmake )
|
||||||
|
|
||||||
|
#
|
||||||
|
# compile specific mpi libraries
|
||||||
|
#
|
||||||
|
case "$WM_MPLIB" in
|
||||||
|
OPENMPI)
|
||||||
|
if [ -r $MPI_ARCH_PATH/lib/libmpi.so ]
|
||||||
|
then
|
||||||
|
echo "have $WM_MPLIB shared library"
|
||||||
|
elif [ -r $MPI_ARCH_PATH/lib/libmpi.a ]
|
||||||
|
then
|
||||||
|
echo "have $WM_MPLIB static library"
|
||||||
|
else
|
||||||
|
(
|
||||||
|
cd $MPI_HOME || exit
|
||||||
|
|
||||||
|
make distclean
|
||||||
|
rm -rf $MPI_ARCH_PATH
|
||||||
|
|
||||||
|
unset mpiWith
|
||||||
|
# as of version 1.3, enable GridEngine
|
||||||
|
if [ -n "$SGE_ROOT" ]
|
||||||
|
then
|
||||||
|
mpiWith="$mpiWith --with-sge"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Infiniband support
|
||||||
|
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
|
||||||
|
# then
|
||||||
|
# mpiWith="$mpiWith --with-openib=/usr/local/ofed"
|
||||||
|
# mpiWith="$mpiWith --with-openib-libdir=/usr/local/ofed/lib64"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--prefix=$MPI_ARCH_PATH \
|
||||||
|
--disable-mpirun-prefix-by-default \
|
||||||
|
--disable-orterun-prefix-by-default \
|
||||||
|
--enable-shared --disable-static \
|
||||||
|
--disable-mpi-f77 --disable-mpi-f90 --disable-mpi-cxx \
|
||||||
|
--disable-mpi-profile \
|
||||||
|
$mpiWith \
|
||||||
|
;
|
||||||
|
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
make distclean
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
MPICH)
|
||||||
|
if [ -r $MPI_ARCH_PATH/lib/libmpich.so ]
|
||||||
|
then
|
||||||
|
echo "have $WM_MPLIB shared library"
|
||||||
|
elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ]
|
||||||
|
then
|
||||||
|
echo "have $WM_MPLIB static library"
|
||||||
|
else
|
||||||
|
(
|
||||||
|
cd $MPI_HOME || exit
|
||||||
|
|
||||||
|
make distclean
|
||||||
|
rm -rf $MPI_ARCH_PATH
|
||||||
|
rm util/machines/machines.*
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--without-mpe \
|
||||||
|
--disable-f77 \
|
||||||
|
--disable-f90 \
|
||||||
|
--disable-f90modules \
|
||||||
|
--disable-c++ \
|
||||||
|
--disable-mpedbg \
|
||||||
|
--disable-devdebug \
|
||||||
|
--disable-debug \
|
||||||
|
--enable-sharedlib=$MPI_ARCH_PATH/lib \
|
||||||
|
--with-device=ch_p4 \
|
||||||
|
-prefix=$MPI_ARCH_PATH
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
make distclean
|
||||||
|
|
||||||
|
if [ -r $MPI_ARCH_PATH ]
|
||||||
|
then
|
||||||
|
cd $MPI_ARCH_PATH/bin
|
||||||
|
for file in *
|
||||||
|
do
|
||||||
|
sed s%$MPI_ARCH_PATH%'$MPI_ARCH_PATH'%g $file > temp.$$
|
||||||
|
mv temp.$$ $file
|
||||||
|
chmod 0755 $file
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $MPI_ARCH_PATH/lib
|
||||||
|
|
||||||
|
if [ -r libmpich.so.1.0 ]
|
||||||
|
then
|
||||||
|
rm *.so
|
||||||
|
ln -s libmpich.so.1.0 libmpich.so
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Build Scotch decomposition
|
||||||
|
(
|
||||||
|
cd scotch_5.1 || exit
|
||||||
|
wmake libso src/libscotch
|
||||||
|
wmake libso src/libscotchmetis
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build Metis decomposition
|
||||||
|
(
|
||||||
|
cd metis-5.0pre2 || exit
|
||||||
|
wmake libso GKlib
|
||||||
|
wmake libso libmetis
|
||||||
|
)
|
||||||
|
|
||||||
|
# Build parMetis. Requires MPI!
|
||||||
|
if [ -d "$MPI_ARCH_PATH" ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd ParMetis-3.1 || exit
|
||||||
|
wmake libso METISLib
|
||||||
|
wmake libso ParMETISLib
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Build ParMGridGen
|
||||||
|
wmake libso ParMGridGen-1.0/MGridGen/IMlib
|
||||||
|
wmake libso ParMGridGen-1.0/MGridGen/Lib
|
||||||
|
|
||||||
|
|
||||||
|
set +x
|
||||||
|
echo
|
||||||
|
echo ==============================
|
||||||
|
echo done ThirdParty Allwmake
|
||||||
|
echo ==============================
|
||||||
|
echo
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
142
bin/tools/makeGcc
Executable file
142
bin/tools/makeGcc
Executable file
@ -0,0 +1,142 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeGcc
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for gmp, mpfr and gcc-4.3.? and gcc-4.4.?
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
gmpVERSION=gmp-4.2.4
|
||||||
|
mpfrVERSION=mpfr-2.4.1
|
||||||
|
gccVERSION="$1"
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||||
|
cat<<USAGE
|
||||||
|
|
||||||
|
usage: ${0##*/} <gcc-4.?.?> ...
|
||||||
|
|
||||||
|
* build gmp, mpfr and gcc-4.3.? and gcc-4.4.?
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "$#" -eq 1 ] || usage "gcc version not provided"
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set the number of cores to build on
|
||||||
|
#
|
||||||
|
WM_NCOMPPROCS=1
|
||||||
|
|
||||||
|
if [ -r /proc/cpuinfo ]
|
||||||
|
then
|
||||||
|
WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
|
||||||
|
[ $WM_NCOMPPROCS -le 8 ] || WM_NCOMPPROCS=8
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building on " $WM_NCOMPPROCS " cores"
|
||||||
|
|
||||||
|
GCC_DIR=$WM_THIRD_PARTY_DIR/$gccVERSION
|
||||||
|
GMP_DIR=$WM_THIRD_PARTY_DIR/$gmpVERSION
|
||||||
|
MPFR_DIR=$WM_THIRD_PARTY_DIR/$mpfrVERSION
|
||||||
|
|
||||||
|
GCCROOT=${GCC_DIR}/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||||
|
GMPROOT=${GMP_DIR}/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||||
|
MPFRROOT=${MPFR_DIR}/platforms/$WM_ARCH$WM_COMPILER_ARCH
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bulid GMP
|
||||||
|
#
|
||||||
|
if [ ! -d $GMPROOT ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd $GMP_DIR \
|
||||||
|
&& make distclean \
|
||||||
|
&& mkdir $GMP_DIR/build \
|
||||||
|
&& cd $GMP_DIR/build \
|
||||||
|
&& ../configure ABI=$ABI --prefix=$GMPROOT \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install
|
||||||
|
|
||||||
|
echo " Finished building gmp."
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo " gmp already built."
|
||||||
|
fi
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH="$GMPROOT/lib:$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build MPFR
|
||||||
|
#
|
||||||
|
if [ ! -d $MPFRROOT ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd $MPFR_DIR \
|
||||||
|
&& make distclean \
|
||||||
|
&& mkdir $MPFR_DIR/build \
|
||||||
|
&& cd $MPFR_DIR/build \
|
||||||
|
&& ../configure ABI=$ABI --prefix=$MPFRROOT --with-gmp=$GMPROOT \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install
|
||||||
|
|
||||||
|
echo " Finished building mpfr."
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo " mprf already built."
|
||||||
|
fi
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH="$MPFRROOT/lib:$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build GCC
|
||||||
|
#
|
||||||
|
if [ ! -d $GCCROOT ]
|
||||||
|
then
|
||||||
|
(
|
||||||
|
cd $GCC_DIR \
|
||||||
|
&& make distclean \
|
||||||
|
&& mkdir $GCC_DIR/build \
|
||||||
|
&& cd $GCC_DIR/build \
|
||||||
|
&& ../configure --enable-languages=c,c++ --with-pkgversion='OpenFOAM' \
|
||||||
|
--enable-__cxa_atexit --enable-libstdcxx-allocator=new \
|
||||||
|
--with-system-zlib --prefix=$GCCROOT \
|
||||||
|
--with-mpfr=$MPFRROOT --with-gmp=$GMPROOT \
|
||||||
|
&& make -j $WM_NCOMPPROCS \
|
||||||
|
&& make install
|
||||||
|
|
||||||
|
echo " Finished building gcc."
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo " gcc already built."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
73
bin/tools/makeQT
Executable file
73
bin/tools/makeQT
Executable file
@ -0,0 +1,73 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# ========= |
|
||||||
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
# \\ / O peration |
|
||||||
|
# \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||||
|
# \\/ M anipulation |
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# License
|
||||||
|
# This file is part of OpenFOAM.
|
||||||
|
#
|
||||||
|
# OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by the
|
||||||
|
# Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
# option) any later version.
|
||||||
|
#
|
||||||
|
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
# for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
#
|
||||||
|
# Script
|
||||||
|
# makeQT
|
||||||
|
#
|
||||||
|
# Description
|
||||||
|
# Build script for Qt-4.3.5
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
QT_VERSION=4.3.5
|
||||||
|
QT_HOME=${WM_THIRD_PARTY_DIR}/qt-x11-opensource-src-${QT_VERSION}
|
||||||
|
QT_ARCH_PATH=${QT_HOME}/platforms/${WM_OPTIONS}
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -d $QT_ARCH_PATH ]
|
||||||
|
then
|
||||||
|
cd $QT_HOME || {
|
||||||
|
echo "no Qt sources found"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
make distclean
|
||||||
|
rm -rf $QT_ARCH_PATH
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--prefix=$QT_ARCH_PATH \
|
||||||
|
-nomake demos \
|
||||||
|
-nomake examples
|
||||||
|
|
||||||
|
if [ -r /proc/cpuinfo ]
|
||||||
|
then
|
||||||
|
WM_NCOMPPROCS=$(egrep "^processor" /proc/cpuinfo | wc -l)
|
||||||
|
[ $WM_NCOMPPROCS -le 8 ] || WM_NCOMPPROCS=8
|
||||||
|
|
||||||
|
echo "Building on " $WM_NCOMPPROCS " cores"
|
||||||
|
|
||||||
|
time make -j $WM_NCOMPPROCS
|
||||||
|
else
|
||||||
|
time make
|
||||||
|
fi
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
echo " Finished building Qt-$QT_VERSION"
|
||||||
|
else
|
||||||
|
echo " Qt-$QT_VERSION already built."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------- end-of-file
|
||||||
Reference in New Issue
Block a user