abuild - a command line build program

The program manages the build process of applications (like the cmdtools, which are built with this).
It takes the source files, compiles them (if necessary, takes into account the dependecies automatically) and builds the target.
It actually composes command lines and executes them (as if this was done/written by hand).

Main features:

The command line parameters:

The available entries in the project files:

A simple project file looks like this:

src = main.cpp \  <-- this means that the next line belongs to this entry
      unit1.cpp
target = test

This project first compiles the two cpp files (the main.obj and unit1.obj are created in the 'obj' directory, respectively). Then it links the two object files into 'test'.
The whole process and its results can be seen here:

A more complex project file:

src = main.cpp \
      unit1.cpp \
      unit2.cpp \
      ../common/globals.cpp                           <-- the paths are relative to the project file
includes = ../common \
           ../utils
target = debug/sample
obj@release = obj_release
target@release = release/sample                       <-- when building the release config, the directory will be created, too
cflags = -g                                           <-- debug information for the default config
cflags@release = ""
LINK_FLAGS = -lstdc++                                 <-- common value for the link settings
lflags = $(LINK_FLAGS) -L ../libs/bin                 <-- link to the debug binaries
lflags@release = $(LINK_FLAGS) -L ../libs/bin_release <-- link to the release binaries
postp@release = strip $(TARGET)                       <-- remove the debug information from the target

A real complex example is one of the project file of the cmdtools.


Attila NAGY Last updated: 2018-08-30