[email protected] schrieb am 25.11.2011 um 10:03 (+0100):
> 
> When i modify an header file (.h) and then i compile the project, not
> all sorce (.c) files that include the modified header are re-compiled
> by make. I've no problems when i modify only the source .c files.

Do you specify the dependency of source files on header files?

| Since our source files now include header files, these new
| dependencies should be recorded in our makefile so that when
| a header file is modified, the corresponding object file will
| be updated.
|
| count_words: count_words.o counter.o lexer.o -lfl
|     gcc $^ -o $@

http://www.makelinux.net/make3/make3-CHP-2-SECT-3

I'm a Make newbie, so I don't know - but there might be a way to have
make (or rather some other program invoked by make) scan C source files
to create Makefile snippets (includes) that translate the dependencies
of source files on header files into Makefile rules.

-- 
Michael Ludwig

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to