Go to the first, previous, next, last section, table of contents.
This sections assume that you are confiedent with the make
utility and with the syntax of the makefiles. In the following when we
write $HOSTTYPE
, we intend the content of the variable
$HOSTTYPE
when the makefile is executed.
The GDT directory tree is compound mainly of two parts: the library and
the tools. The library is independent the tools require that the
library has already been built.
The directory structure is the following some important files are
explicitly specified:
custom.example
custom.$HOSTTYPE
makefile
src/
src/makefile
src/*.c
tools/
tools/common.make
tools/makefile
tools/GRID/makefile
tools/blag/makefile
tools/n-th toool/makefile
This file is included by every other makefile.
This file should be present for each makefile to work properly. It
should contains variable definitions according to the syntax of the
makefiles along the line showed by `custom.example'.
The top level makefile check if `custom.$HOSTTYPE' exist otherwise
signal the user with an appropriate message.
The makefiles create the following directories (if they do not exist):
bin/
bin/$HOSTTYPE
obj/
obj/$HOSTTYPE
lib/
lib/$HOSTTYPE
$HOSTTYPE
$HOSTTYPE
$HOSTTYPE
This scheme permits to keep distinct executables, objects, and libraries, that strictly depends on the platform.
Just typing `make' has the following effects:
The only targets that are always available are clean
and
delete
. clean
delete object files, backup files and
everything that is not useful after compilation. delete
delete
also binaries and libraries.
The target gdt
make always just `lib/$HOSTTYPE/libGDT.a' independently
from the current directory.
The targets GRID, blag, etc.
in the root make the same thing as if just
make
were typed in the corresponding tool directory.
The makefiles heavily rely on the recursive capability of
the make utility. They call each other from top level (the root makefile)
to the bottom level (the tools makefiles). But all the tools, make gdt
before linking.
The files `tools/*/makefile' are very simple. In fact all the tools
just are made of one file `GRID.c' and they link the library. So, they
include the `tools/common.make' that contains everything.
make
from the GDT root directory at least one time before
running it form a subdirectory.
$HOSTTYPE
is quite standard, but if
the user has not defined it the makefiles do not work. The workaround is check
and define $HOSTTYPE
manually.
$HOSTTYPE
consider just the machine. That is we cannot compile
with different compiler on a same machine. The workaround is to redefine
$HOSTTYPE
accordingly.
Go to the first, previous, next, last section, table of contents.