LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gnatmake

Ada program build utility

TLDR

Compile an Ada program
$ gnatmake [main.adb]
copy
Compile with optimization
$ gnatmake -O2 [main.adb]
copy
Compile with debugging info
$ gnatmake -g [main.adb]
copy
Compile with parallel jobs
$ gnatmake -j4 [main.adb]
copy
Specify output executable name
$ gnatmake [main.adb] -o [program]
copy
Force recompilation of all sources
$ gnatmake -f [main.adb]
copy

SYNOPSIS

gnatmake [options] filename [options_]

DESCRIPTION

gnatmake is the primary build utility for Ada programs in the GNAT (GNU Ada Toolset) environment. It automatically determines dependencies by analyzing Ada's with clauses, compiles modified source files, and performs binding and linking to create an executable. Unlike traditional make utilities, gnatmake always recomputes dependencies from sources, ensuring accurate tracking of changes.

PARAMETERS

-jN

Use N parallel jobs for compilation.
-g
Generate debugging information.
-Olevel
Optimization level (0, 1, 2, 3, or s for size).
-o name
Output executable name.
-c
Compile only, do not bind or link.
-f
Force recompilation of all sources.
-q
Quiet mode, less output.
-v
Verbose mode.
-Idir
Add directory to source search path.
--RTS=runtime
Specify Ada runtime library.

INSTALL

sudo apt install gnat-12
copy
sudo dnf install gcc-gnat
copy
sudo apk add gcc-gnat
copy

CAVEATS

Multiple main files can be specified to build several executables. Dependencies are computed from Ada source files rather than object file timestamps.

SEE ALSO

gcc(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid