we use make to compile the objects out of the c-source files. We use pattern rules in the form of:
%.obj: %.c $(CC) $(CFLAGS) $(OUTFILE) $(INCLDIRS) $<
Changes of a c-file will be noticed by make and a recompile of that file will happen.
Now the problem is of course, if just a header file (which is included in a c-file) changes, the makefile will not notice it and will therefore not recompile that file.
A solution is, to add the header files in the makefile to each c-file by hand to let make the dependencies know (a lot to add to the makefile, not a good solution). A recompile of everything is another solution but very time consuming.
My question is:
Does the ccrx compiler support any mechanism like the -MM option from the gcc compiler? (Scan of the c-files and the included headers and generation of a file with that information)
How can I let make know the header dependencies?
In reply to JB:
In reply to Benjamin:
CC-RX does not have anything like the -MM option. It cannot generate the dependencies for C files.e2 studio can do this. can you use the make files generated in e2 studio?
In reply to FrankL: