RES: Headers in application makefiles
Fabrício de Novaes Kucinskis
fabricio at dea.inpe.br
Thu Dec 22 12:36:59 UTC 2005
Andreas,
Thank you for the help. When trying to use .d files, I realized that I was
probably making a simple mistake when informing the dependencies. Looking
carefully, I noticed that the only change needed in the makefile is to
insert the dependency "$(OBJS): myheader.h" just before "$(PGM): $(OBJ)".
And now everything works!
>> However, I don't really know, how much of manually edited and created
>> Makefiles Eclipse supports.
Using a Standard (not Managed) C/C++ project, Eclipse doesn't make
assumptions about your makefile, so you can change anything you want.
Thanks again and best regards,
-----Mensagem original-----
De: Andreas Pfeil [mailto:ap at rsise.anu.edu.au]
Enviada em: quarta-feira, 21 de dezembro de 2005 21:15
Para: Fabrício de Novaes Kucinskis
Assunto: Re: Headers in application makefiles
Hallo,
the make info documentation provides a possibility to do automatic
dependency checking on files, using *.d files for the dependency
information and some extra rules to create these *.d files.
Putting this into your Makefile should lead to the correct dependency of
your source files on also the header files.
Note that, however, make -B will no longer work, as it ends up in an
endless loop constantly recreating the .d files.
Take a look, e.g. using "info make"
and then the node is Rules->Automatic Prerequesites
However, I don't really know, how much of manually edited and created
Makefiles Eclipse supports.
Hope, that helps,
Andreas
Fabrício de Novaes Kucinskis wrote:
> Hello,
>
>
> As I said in my last question, I have an application with some .c files
and
> only one header, which I #include in all source files.
>
> I noticed that "make" doesn't run when I change only the header. This is
> because of the makefile, which doesn't inform that the source files
depends
> on the header. So, each time the header is changed, I have to clean the
> current build before start a new one. As I'm using an IDE (Eclipse) I
cannot
> just create a batch file and run it - the IDE would not get the errors in
> the build process.
>
> I'm using a makefile based on the "hello_world_c" makefile, and I tried to
> use DEPEND and "foo.o: foo.c foo.h", but with no success. How can I inform
> that there's dependency to a header in RTEMS makefiles?
>
> Thank you in advance,
>
>
> Fabrício de Novaes Kucinskis - DEA / INPE
> -----------------------------------------
> Divisão de Eletrônica Aeroespacial
> Instituto Nacional de Pesquisas Espaciais
>
More information about the users
mailing list