what is .d file after building with make

前端 未结 1 1440
不知归路
不知归路 2021-02-01 00:38

Sometimes, I find .d files for a given source file. For instance, if I compile test.c, I\'ve got

test.d, test.o

I under

相关标签:
1条回答
  • 2021-02-01 01:12

    Many build systems add automatically detected make dependencies into the .d file. In particular, for C/C++ source files they determine what #include files are required and automatically generate that information into the .d file.

    The .d files are then included by the makefile so make is aware of that information. If you look at the contents of those files they'll be make prerequisite statements, like:

    foo.o : foo.h bar.h biz.h
    

    etc.

    0 讨论(0)
提交回复
热议问题