I'm using GCC together with FASM for my hobby OS. Assembler objects are written in FASM, C objects in GCC, and then everything is linked together with LD.
I am automatically calculating dependencies for C objects with the following code in MAKEFILE:
.PHONY: dep
dep:
$(SED) '/\#\#\# GCC dependencies/q' < Makefile > tmp_make
for i in *.c; do \
$(CC) $(INCLUDE) -M $$i; \
done >> tmp_make
$(MV) tmp_make Makefile
Unfortunatelly, FASM does not have -M flag, so I can calculate only C dependencies currently. NASM have -M, but I prefer FASM syntax. So, maybe somebody have written some utility for this purpose. Or maybe this could be added to FASM itself. I don't like to maintain dependencies by hand.