ezc is supposed to be really easy to use, as YAML is a very user friendly, easy to use configuration format.
Here's an example of an ezc.yml file in your project:
cc: gcc
src:
- src/main.c
output: someapp
std: c99
flags:
- -Wall
- -Wextra
extra_libs:
- m
Here's a walkthrough of what it does:
ccdefines the compiler to use. It usually will begcc, org++, depending if you use C or C++.srcdefines the source files to compile.outputlabels the output file. In this example, it'ssomeapp.stdis optional, and is used to define the version of the standard library you want to use. For example, on C, you could usec99, which is the C99 standard.flagsdefines optional flags to compile with. It could include things like-Wall,-m64, and other things.extra_libsdefines extra libraries to link with.mis the mathematical library for C/C++, which is used in many cases.
You also could do the following:
cc: g++
src:
- src/*.cpp
output: otherapp
flags:
- -Wall
- -Wextra
- -m64
Here's what that config uses:
ccisg++. This means it's a C++ based project.- In the
srcfiles, we dosrc/*.cpp, which gets all files in thesrcdirectory that end with.cpp. - We set the output file to be
otherapp, to differ from the previous example. - We don't define the standard, as it's optional, and is set by the compiler by default.
- We use the same flags as before, but we addded
-m64, to make the compiler compile a 64-Bit application. - We don't actually need to define extra libraries. They aren't used in some apps.