Corrected a few issues with the makefile.
Generalized the creation of library object files.