add external dependency to Makefile
use a cache instead of a map so we don't exhaust memory