Ignore generated source files and library
Build these objects only once

Because $(SOURCES) contains non-.cpp files, object files were being
built twice, once as .o and once (somewhat by luck!) as .h.