Additional work on the makefile generation. A little cleaner now. Still needs some work.