Make auto dependencies.
Some minor changes in preparation to elf outputting.