Next: Avoid Duplication With Variables, Previous: Compiling with Project Files, Up: Building With Projects
By default, the executable name corresponding to a main file is computed from the main source file name. Through the attribute `Builder.Executable', it is possible to change this default.
For instance, instead of building `proc' (or `proc.exe' on Windows), we could configure our project file to build "proc1" (resp proc1.exe) with the following addition:
project Build is ... -- same as before package Builder is for Executable ("proc.adb") use "proc1"; end Builder end Build;
Attribute `Executable_Suffix', when specified, may change the suffix of the executable files, when no attribute Executable applies: its value replaces the platform-specific executable suffix. The default executable suffix is empty on UNIX and ".exe" on Windows.
It is also possible to change the name of the produced executable by using the command line switch `-o'. When several mains are defined in the project, it is not possible to use the `-o' switch and the only way to change the names of the executable is provided by Attributes Executable and Executable_Suffix.