Simplify source finding, fix dependency generation and workaround borken avr-size