4.6. Examples of gnatmake Usage

prefix-gnatmake hello.adb

Compile all files necessary to bind and link the main program hello.adb (containing unit Hello) and bind and link the resulting object files to generate an executable file hello.

prefix-gnatmake -q Main_Unit -cargs -O2 -bargs -l

Compile all files necessary to bind and link the main program unit Main_Unit (from file main_unit.adb). All compilations will be done with optimization level 2 and the order of elaboration will be listed by the binder. gnatmake will operate in quiet mode, not displaying commands it is executing.