First, all of the required files are determined.
The description file sys/desc/hello.lnk is recognized as the description of an executable program from the file extension .lnk. This description contains only one file:
:SAPDB/HelloWorld.c
The colon stands for the directory with the module files sys/src.
The system recognizes from the file extension .c that the module file sys/src/SAPDB/HelloWorld.c is a module file that has to be translated with the C compiler. The include files required by this module file are listed in the description file sys/desc/SAPDB.com:
HelloWorld.c inc=:SAPDB/HelloWorld.h
This line can contain further compiler options.
The include file sys/src/SAPDB/HelloWorld.h does not require any further files. Otherwise, these dependencies would also have to be entered in SAPDB.com.
Once the required files have been determined, each of these files is updated.
· Include Files
HelloWorld.h
HelloWorld.c fast
hello.lnk fast
These files are copied from the development area (General Directory Structure) to a suitable subdirectory sys/wrk/incl, in this case, to sys/wrk/inl/SAPDB/HelloWorld.h.
File names in #include statements, therefore, must always be specified relative to sys/wrk/incl.
· C sources
HelloWorld.h
HelloWorld.c fast
hello.lnk fast
These are converted to object files using the C compiler.
Object files can be created in three different versions (VMAKE versions):
* fast: with optimization
* quick: with assertions
* slow: with assertions and trace outputs
In this case, the file created is written to sys/wrk/fast/obj/SAPDB/HelloWorld.o.
Object files are also assigned the file extension .o on Microsoft Windows.
The source file is copied to the sys/wrk/fast/tmp directory for translation. All of the intermediate results (this is particularly relevant for PASCAL sources) are created in this directory, and can be viewed in the event of an error.
· Executable programs
HelloWorld.h
HelloWorld.c fast
hello.lnk fast
These are linked and copied to usr/pgm.
On UNIX systems, usr/pgm/hello.f is created and a link to it is entered in the file system, under usr/pgm/hello.
On Microsoft Windows, the file usr\pgm\hello.exe.f is created and copied to usr\pgm\hello.exe.