Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not make by itself, but gcc comes with related preprocessor options[1], in particular -MMD.

Add that to your CFLAGS and include the generated dependency files by adding something like

    -include $(OBJECTS:%.o=%.d)
to the Makefile.

[1] http://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: