The latest version of this document is always available at http://tfel.sourceforge.net/packages.html.
This document describes how to generate packages for
TFEL. It relies on the instructions given here to build
TFEL from the sources using the
cmake build system.
The section is only meaningful if you wish to share the generated packages between various computers: it can be skipped if you only want to generate a package for you personal use.
By portable, we mean binaries that can be executed on machines:
the same environment. This most notably means:
boost-pythonlibraries if the
pythonbindings are enabled).
However, using portable binaries does not affect the fact that
MFront will try to generate the most effective code for you particular machine once installed. We rely on the fact that most compilers have an option to detect the current machine processor: for
clang this option is
-march=native. This option is still enabled when compiling libraries generated by
MFront when using the
--obuild option. This is why it is preferable to use portable binaries with the same compiler version that the one use to produce those binaries.
We introduced an additional option to
enable-portable-build to allow building a portable version of
TFEL. This option must be added to the
cmake command line:
$ cmake [options] -Denable-portable-build=ON
The various other options that can be passed to
cmake are described here.
$ cmake [options] -Denable-portable-build=ON $ make $ cpack -G [GENERATOR_NAME]
The list of available generators are given by the
cpack --help command:
$ cpack --help
Debian wheezy, the following generators are avaiable:
DEB: Debian packages
NSIS: Null Soft Installer
RPM: RPM packages
STGZ: Self extracting Tar GZip compression
TBZ2: Tar BZip2 compression
TGZ: Tar GZip compression
TZ: Tar Compress compression
ZIP: ZIP file format
Depending on the options provided to the
cmake command and the generator used, various packages can be build:
corecontains all the core
docscontains the reference documentation (for
$ cmake ../trunk -DCMAKE_BUILD_TYPE=Release -Dlocal-castem-header=ON -Denable-fortran=ON -Denable-python=ON -Denable-python-bindings=ON -Denable-aster=ON -Denable-zmat=OFF -Denable-cyrano=ON -Denable-portable-build=ON $ cpack -G DEB
$ cmake ../trunk -DCMAKE_BUILD_TYPE=Release -Dlocal-castem-header=ON -Denable-fortran=ON -Denable-python=ON -Denable-python-bindings=ON -Denable-aster=ON -Denable-zmat=OFF -Denable-cyrano=ON -Denable-portable-build=ON -DLIB_SUFFIX=64 $ cpack -G RPM
LIB_SUFFIX is used to specify that the libraries must be place in the
If you have a cross-compiler (in the case of your example,
mingw64) and the
nsis package installed, one can build a
Windows package like this:
$ cmake ../trunk -DCMAKE_BUILD_TYPE=Release -Dlocal-castem-header=ON -Denable-fortran=ON -Denable-python=OFF -Denable-python-bindings=OFF -Denable-aster=ON -Denable-zmat=OFF -Denable-cyrano=ON -DCMAKE_TOOLCHAIN_FILE=../trunk/cmake/ToolChain-i686-w64-mingw32.cmake -DCMAKE_INSTALL_PREFIX=/home/th202608/codes/tfel/tfel-2.0.x/install -Denable-portable-build=ON -Denable-static=ON $ cpack -G NSIS
enable-static portion is mandatory since the shared libraries associated with the cross compiler won't be present on
One may use another cross-compiler by providing an appropriate tool-chain file.