Not entirely sure this is what you're after, but you can easily get a list of includes by generating the post-CPP-processed file from the base c file, and grepping out the file/line number comments, e.g., using gcc
gcc -E main.c {usual flags} | grep '#' | cut -d' ' -f3 | sort | uniq
where main.c is your base c file.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…