The common.mk file

Updated: April 19, 2023

The common.mk include file is where you put the traditional makefile options, such as compiler options. This is usually the only file you need to modify to add customizations to the build process.

In order for the common.mk file to be able to determine which system to build the particular objects, libraries, or executables for, we analyze the pathname components in the bottommost level in reverse order as follows:

For example, if we have a pathname of /source/factory/robot_plc/driver/nto/arm/o.be, then the macros are set as follows:

Macro Value
VARIANT1 o.be
CPU arm
OS nto
SECTION driver
PROJECT robot_plc