generalise tests
add dynamic library target
add static library target