The qdepfile.mk include file

Updated: October 28, 2024

The qdepfile.mk include file provides support for dependency list generation to the qcc compiler.

Most versions of make don't know how to pre-process C or C++ code to generate dependencies themselves. The qdepfile.mk file adds the configuration for make to create these dependency (.d) files, which consists of a list of headers that are tracked for changes.

The qdepfile.mk file resides under $QNX_TARGET/usr/include/mk.

When you use qdepfile.mk, you must invoke make depends from the project directory. Refer to make for more details about make depends. Your common.mk file should look like this:

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

# Preset make macros go here

include $(MKFILES_ROOT)/qtargets.mk
include $(MKFILES_ROOT)/qdepfile.mk

# Postset make macros go here