avoid building one-file mains, for now.
add rules for installing into state directories
use explicit xx_OBJ macros instead of wildcards.
added TEST_LIBS