2024-03-04 03:53:29 +00:00
|
|
|
# ngen
|
2024-03-04 18:27:43 +00:00
|
|
|
Build file generator (engine) for the [Ninja build
|
2024-03-04 03:53:29 +00:00
|
|
|
system](https://ninja-build.org/).
|
|
|
|
|
|
|
|
Licensed under the GPLv3.
|
2024-03-04 18:24:33 +00:00
|
|
|
|
|
|
|
## Methodology and Overview
|
|
|
|
The problem with existing meta build systems---or makefile generators---like
|
|
|
|
[Meson](https://mesonbuild.com/) and [CMake](https://cmake.org/) is that they
|
|
|
|
are needlessly complex for small-to-medium-sized C/C++ projects. These projects
|
|
|
|
are just large enough that hand-writing a makefile would be painful, but trying
|
|
|
|
to configure a large meta build system would be just as painful. It is
|
|
|
|
unacceptable that building a simple project with 10 .c files and a library
|
|
|
|
requires knowledge of a unique, obscure configuration language which is
|
|
|
|
constantly changing.
|
|
|
|
|
|
|
|
*ngen* aims to make generating build files for these small C/C++ projects as
|
|
|
|
simple as possible by using a basic key-value configuration file using patterns
|
|
|
|
that any experienced programmer should be familiar with. In doing so, ngen
|
|
|
|
fills the gap between writing your own makefile and wrangling with
|
|
|
|
CMakeLists.txt.
|
|
|
|
|
|
|
|
ngen generates files for the [Ninja](https://ninja-build.org/) build system.
|
|
|
|
Ninja is a small, modern build system that uses a bare-bones configuration
|
|
|
|
language that is easy to both read and generate (but not necessarily easy to
|
|
|
|
write by hand). "Where other build systems are high-level languages Ninja aims
|
|
|
|
to be an assembler," according to Ninja's website. It can be thought of as a
|
2024-03-04 18:27:43 +00:00
|
|
|
simpler, faster replacement for the classic `make`. It is used by default by
|
2024-03-04 18:24:33 +00:00
|
|
|
Meson; CMake can also be configured to use ninja as a backend.
|