Go to the first, previous, next, last section, table of contents.


4 The GDT directory and the Makefiles

4.1 Preliminaries

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

4.2 The File `custom.$HOSTTYPE'

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.

4.3 The Product of the Makefiles


The makefiles create the following directories (if they do not exist):


bin/
bin/$HOSTTYPE
obj/
obj/$HOSTTYPE
lib/
lib/$HOSTTYPE

This scheme permits to keep distinct executables, objects, and libraries, that strictly depends on the platform.

4.4 Available Targets


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.

4.5 Implementation

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.

4.6 Bugs


Go to the first, previous, next, last section, table of contents.