core: let the makefile only check toplevel dirs in deps. Prevents unneeded recursion into sub-directories.