The include file

Since the common makefiles have a lot of defaults based on the names of various directories, you can simplify your life enormously in the include file if you choose your directory names to match what the common makefiles want.

For example, if the name of the project directory is the same as the name of the image, you don't have to set the NAME macro in

The prototypical file looks like this:

ifndef QCONFIG
include $(QCONFIG)

# Preset make macros go here

include $(MKFILES_ROOT)/

# Post-set make macros go here

The include file provides the root paths to various install, and usage trees on the system, along with macros that define the compilers and some utility commands that the makefiles use. The purpose of the include file is to let you tailor the root directories, compilers, and commands used at your site, if they differ from the standard ones that we use and ship. Therefore, nothing in a project's makefiles should refer to a compiler name, absolute path, or command name directly. Always use the macros.

The file resides in $QNX_TARGET/usr/include/mk as (where os is the host OS, e.g., nto, linux, win32), which is a symbolic link from the place where make wants to find it (namely $QNX_TARGET/usr/include/ You can override the location of the include file by specifying a value for the QCONFIG macro.

If you wish to override the values of some of the macros defined in without modifying the contents of the file, set the QCONF_OVERRIDE environment variable (or make macro) to be the name of a file to include at the end of the main file.

Note: Some examples of override files set VERSION_REL, which specifies the version of the OS that you're building for. This variable is primarily for internal use at QNX Software Systems; it indicates that make is running on a build machine instead of on a developer's desktop. If you set this variable, make becomes a lot more particular about other settings (e.g., it will insist that you set PINFO).