Only generate depends if the compiler supports it.

For assembly files, AS_DEPENDS needs to be set. As usually AS is set to
CC, it can be done using AS_DEPENDS = ${CC_DEPENDS}.