Makefile to rebuild during header file changes
问题 I'm trying to write a Makefile for a project. With that, I was able to build the project whenever there is a change in any of the C files. But, it doesn't build when there is a change in a header file. So, I'm trying Makefile for a simpler directory structure and if it works I'm planning to do the same in the main project. The directory structure is, src -> code1 -> file1.c src -> code2 -> file2.c src -> code1inc -> file1.h src -> code2inc -> file2.h All the files together should build and