qconfig.mk macros

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

CP_HOST
Copy files from one spot to another.
LN_HOST
Create a symbolic link from one file to another.
RM_HOST
Remove files from the filesystem.
TOUCH_HOST
Update a file's access and modification times.
PWD_HOST
Print the full path of the current working directory.
CL_which
Compile and link.
CC_which
Compile C/C++ source to an object file.
AS_which
Assemble something to an object file.
AR_which
Generate an object file library (archive).
LR_which
Link a list of objects/libraries to a relocatable object file.
LD_which
Link a list of objects/libraries to a executable/shared object.
UM_which
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.