only open the Foreign module where it's actually required
update gitignore
use a stamp file for the _build dir
tweaks: use $(CC) instead of cc directly