added targets to build a static library and to install libs and headers

the environment variablesLIBDIR and INCDIR, if defined,
will be used as target install directories