Fix GNU Make build system

Fix computation of product names.
Build products and immediates with pthreads support.
Ignore immediates

Add file `.gitignore` so that Git ignores immediate directories.