makefile - dependency generator
Ok I have two questions to a single problem that I am facing....

We have adopted non-recursive [boilermake](https://github.com/dmoulding/boilermake) for projects that use gcc. Going ahead we would like to use it for some other cross compilers say microchip C18 that do not support -MM / MD option for dependency generation.

I do not want to use makedepend since its very old and adds in dependencies to makefiles, further I believe it will be difficult separate objects from sources with makedepend. 

finally my questions 
<pre>
1. Are there any readily C/C++ dependency generators ? (build support is required for both Windows and Linux)
2. Can I use gcc to only generate dependency files and do the actual compilation with some other compiler ? Will I run into any problems with this approach ?
if yes what will be the changes required to following # COMPILE_C_CMDS - Commands for compiling C source code.

define COMPILE_C_CMDS
	@mkdir -p $(dir $@)
	$(strip ${CC} -o $@ -c -MD ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
	    ${SRC_INCDIRS} ${SRC_DEFS} ${DEFS} $<)
	@cp ${@:%$(suffix $@)=%.d} ${@:%$(suffix $@)=%.P}; \
	 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
	     -e '/^$$/ d' -e 's/$$/ :/' < ${@:%$(suffix $@)=%.d} \
	     >> ${@:%$(suffix $@)=%.P}; \
	 rm -f ${@:%$(suffix $@)=%.d}
endef

</pre>

makefile - dependency generator
===

Ok I have two questions to a single problem that I am facing....

We have adopted non-recursive [boilermake](https://github.com/dmoulding/boilermake) for projects that use gcc. Going ahead we would like to use it for some other cross compilers say microchip C18 that do not support -MM / MD option for dependency generation.

I do not want to use makedepend since its very old and adds in dependencies to makefiles, further I believe it will be difficult separate objects from sources with makedepend. 

finally my questions 
<pre>
1. Are there any readily C/C++ dependency generators ? (build support is required for both Windows and Linux)
2. Can I use gcc to only generate dependency files and do the actual compilation with some other compiler ? Will I run into any problems with this approach ?
if yes what will be the changes required to following # COMPILE_C_CMDS - Commands for compiling C source code.

define COMPILE_C_CMDS
	@mkdir -p $(dir $@)
	$(strip ${CC} -o $@ -c -MD ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \
	    ${SRC_INCDIRS} ${SRC_DEFS} ${DEFS} $<)
	@cp ${@:%$(suffix $@)=%.d} ${@:%$(suffix $@)=%.P}; \
	 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
	     -e '/^$$/ d' -e 's/$$/ :/' < ${@:%$(suffix $@)=%.d} \
	     >> ${@:%$(suffix $@)=%.P}; \
	 rm -f ${@:%$(suffix $@)=%.d}
endef

</pre>
