to link statically some libraries

We are writing some short programs that use some API libraries to be
executed in shell scripts. As loading the shared API library takes 2 or
3 times the execution time, we’d like to link them to the static
version. But, we’d like to use the

How to obtain the following command line with a recursive makefile:

qcc -o prog prog.o -lc -Bstatic -lmyAPI