How to make dependencies in IDE

bridged with qdn.public.qnxrtp.devtools
Post Reply
Marty Doane

How to make dependencies in IDE

Post by Marty Doane » Mon Dec 16, 2002 3:50 pm

I've got a large existing project with custom makefiles that create
dependency files using
gcc -MM -I<path> <sourcefile> | 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<path> <sourcefile>
results in "syntax error before '.'"

So how do I do the dependency file creation?

Thanks,
--
Marty Doane
Siemens Dematic

Doug Fowley

Re: How to make dependencies in IDE

Post by Doug Fowley » Mon Dec 23, 2002 6:30 am

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, <name>.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<path> <sourcefile> | 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<path> <sourcefile
results in "syntax error before '.'"

So how do I do the dependency file creation?

Thanks,
--
Marty Doane
Siemens Dematic


Post Reply

Return to “qdn.public.qnxrtp.devtools”