Here we provide a small example of a makefile, which is used to compile and build examples delivered with CUBE. Similar makefiles can be used by developers to compile and build own CUBE tools.
First we specify the installation path of CUBE and its "cube-config" script. This script delivers correct flags for compiling and linking, paths to the CUBE tools and GUI. (besides of another useful technical information)
Additionally we specify CPPFLAGS and LDFLAGS to compile and link examples.
Here a compiler is selected to compile and build the example.
We define explicit suffixes for an executable file, created from C source, from c++ source and an MPI executable. If one develops a tool, which is using MPI, it is useful (sometimes) to define a special suffix for automatic compilation.
Object files of examples and their targets
Automatic rule for the compilation of every single C++ source into .o file and for building targets.
Automatic rule for the compilation of every single C++ with MPI source into .o file and for building targets.
Automatic rule for the compilation of every single C source into .o file and for building targets.
Copyright © 1998–2015 Forschungszentrum Jülich, Jülich Supercomputing Centre |