qconfig.mk macros

Here's a summary of the macros available from qconfig.mk:

Copy files from one spot to another.
Create a symbolic link from one file to another.
Remove files from the filesystem.
Update a file's access and modification times.
Print the full path of the current working directory.
Compile and link.
Compile C/C++ source to an object file.
Assemble something to an object file.
Generate an object file library (archive).
Link a list of objects/libraries to a relocatable object file.
Link a list of objects/libraries to a executable/shared object.
Add a usage message to an executable.

The which parameter can be either the string HOST for compiling something for the host system or a triplet of the form os_cpu_compiler to specify a combination of target OS and CPU, as well as the compiler to be used.

The os is usually the string nto to indicate Neutrino (i.e., the QNX Neutrino RTOS). The cpu is one of x86 or arm. Finally, the compiler is usually gcc.

For example, you could use the macro CC_nto_x86_gcc to specify:

The following macro contains the command-line sequence required to invoke the GCC compiler:

CC_nto_x86_gcc = qcc -Vgcc_ntox86 -c

The various makefiles use the CP_HOST, LN_HOST, RM_HOST, TOUCH_HOST, and PWD_HOST macros to decouple the OS commands from the commands used to perform the given actions. For example, under most POSIX systems, the CP_HOST macro expands to the cp utility. Under other operating systems, it may expand to something else (e.g., copy).

In addition to the macros mentioned above, you can use the following macros to specify options to be placed at the end of the corresponding command lines:

The parameter "which" is the same as defined above: either the string "HOST" or the ordered triplet defining the OS, CPU, and compiler.

For example, specifying the following:

CCPOST_nto_x86_gcc = -ansi

causes the command line specified by CC_nto_x86_gcc to have the additional string "-ansi" appended to it.