wrote the makefile more generic

also edited directory hierachy