Ah, right.. I almost forgot about windows. I remember dynamic libraries don't have a `lib` prefix. Are static libraries prefixed? I thought they were named `foo.lib`.

Taking an optional argument is of course the most flexible way. I just thought using the target filename would be a better default than the source filename, since in the end the dep-file describes dependencies for rebuilding the output and I had troubles with the current naming scheme when building multiple targets from the same source.

Besides an optional argument (I'll try that as well), do you think the default should be based on the source or the output filename? Using the output filename would be a more useful default imo - using the source filename is like gcc (but will result in `lib.d`/`bin.d`/`test.d` files most of the time).