How to make dependencies in IDE

I’ve got a large existing project with custom makefiles that create
dependency files using
gcc -MM -I | sed …

I can’t seem to find a way to get the Windows-based stuff to create this
dependency info. gcc does not seem to be present (only qcc), and using
qcc -Vgcc_ntox86_gpp -Wp,-MM -I
results in “syntax error before ‘.’”

So how do I do the dependency file creation?

Thanks,

Marty Doane
Siemens Dematic

Marty,

I add the following to COMMON.MK:

automatically generate dependencies for the object files

CCFLAGS += -Wp,-MD -Wp,$(@:.o=.d)
CLEAN += *.d *.i
sinclude *.d

where

CCFLAGS … : creates a dependency file, .d, in addition to the
object file everytime the source is compiled.

CLEAN … : delete the dependency files when you `make clean’.

sinclude … : include the dependency files in the make process.

Hope this helps!


Doug


Marty Doane wrote:

I’ve got a large existing project with custom makefiles that create
dependency files using
gcc -MM -I | sed …

I can’t seem to find a way to get the Windows-based stuff to create this
dependency info. gcc does not seem to be present (only qcc), and using
qcc -Vgcc_ntox86_gpp -Wp,-MM -I <sourcefile
results in “syntax error before ‘.’”

So how do I do the dependency file creation?

Thanks,

Marty Doane
Siemens Dematic