Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » MBS generated makefiles
MBS generated makefiles [message #161453] Fri, 06 January 2006 13:11 Go to next message
Eclipse UserFriend
Originally posted by: D.beckmann.student.fontys.nl

Hi at all,

I am currently trying to understand how the makefiles which the MBS is
generating for my managed make c project are working. In principle it is
clear what the several kinds of makefiles are generated for. But there is
one little thing I do not understand.

There is one command in the subdir.mk which does not make sense to me. May
be one of you can help me out. The line from the subdir.mk file I do not
completly understand is ...

gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d)

Thanks in advance for your help

regards
Re: MBS generated makefiles [message #161460 is a reply to message #161453] Fri, 06 January 2006 14:27 Go to previous messageGo to next message
Eclipse UserFriend
Dennis,
This is a call to compile the input file into an object module with a
twist. The call asks the proprocessor to generate dependency information
for the unit under compilation (i.e. foo.c depends on foo.h and bar.h,
so you want a makefile structure that will force a recompile of foo.c in
the event that either of those files change). The line will cause the
dependency info to be redirected into a file with the same name but a .d
extension that is included by make for subsequent builds. GCC supports a
much cleaner solution in 3.X versions and above, but the MBS has to
support 2.X compilers.

Sean

Dennis wrote:
> Hi at all,
>
> I am currently trying to understand how the makefiles which the MBS is
> generating for my managed make c project are working. In principle it is
> clear what the several kinds of makefiles are generated for. But there
> is one little thing I do not understand.
> There is one command in the subdir.mk which does not make sense to me.
> May be one of you can help me out. The line from the subdir.mk file I do
> not completly understand is ...
>
> gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d)
> Thanks in advance for your help
>
> regards
>
Re: MBS generated makefiles [message #161471 is a reply to message #161460] Fri, 06 January 2006 17:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vnpham.us.gmail.com

May I ask which is the cleaner solution in GCC 3.x that you're talking
about ?

Thanks,

Vinh N. Pham

Sean Evoy wrote:
> Dennis,
> This is a call to compile the input file into an object module with a
> twist. The call asks the proprocessor to generate dependency information
> for the unit under compilation (i.e. foo.c depends on foo.h and bar.h,
> so you want a makefile structure that will force a recompile of foo.c in
> the event that either of those files change). The line will cause the
> dependency info to be redirected into a file with the same name but a .d
> extension that is included by make for subsequent builds. GCC supports a
> much cleaner solution in 3.X versions and above, but the MBS has to
> support 2.X compilers.
>
> Sean
>
> Dennis wrote:
>
>> Hi at all,
>>
>> I am currently trying to understand how the makefiles which the MBS is
>> generating for my managed make c project are working. In principle it
>> is clear what the several kinds of makefiles are generated for. But
>> there is one little thing I do not understand.
>> There is one command in the subdir.mk which does not make sense to me.
>> May be one of you can help me out. The line from the subdir.mk file I
>> do not completly understand is ...
>>
>> gcc -MM -MG -P -w -O0 -g3 -Wall -c -fmessage-length=0 $< >> $(@:%.o=%.d)
>> Thanks in advance for your help
>>
>> regards
>>
Re: MBS generated makefiles [message #161565 is a reply to message #161471] Tue, 10 January 2006 04:36 Go to previous message
Eclipse UserFriend
Originally posted by: screetch.gmail.com

Vinh N. Pham wrote:
> May I ask which is the cleaner solution in GCC 3.x that you're talking
> about ?
http://www.gnu.org/software/gcc/news/dependencies.html
Previous Topic:Tet Hover shows keywords highlighted
Next Topic:Set the include path of sub-directory
Goto Forum:
  


Current Time: Sat Jun 07 22:50:37 EDT 2025

Powered by FUDForum. Page generated in 0.03506 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top