The common.mk file

QNX SDP8.0Programmer's GuideDeveloper

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:

  • the last component is assigned to the VARIANT1 macro
  • the next previous component is assigned to the CPU macro
  • the next previous component is assigned to the OS macro
  • the next previous component is assigned to the SECTION macro
  • the next previous component is assigned to the PROJECT macro

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

Macro Value
VARIANT1 o.be
CPU aarch64le
OS nto
SECTION driver
PROJECT robot_plc
Page updated: