Different makefile search order, fixed tabs

Changed the search order for makefiles so that direct-descendant directories
have higher priority over out-of-source directories. Previously, only the
current directory had higher priority, and direct-descendant directories were
checked not at all.