Template

Eduardo Cesar Cabrera Flores eccf@super.unam.mx
Mon Apr 7 18:19:00 GMT 2003



On 31 Mar 2003, Matthias Oltmanns wrote:

> Hi Eduardo,
>
> i'm not sure if you asking for "How to write a makefile". If so i would
> suggest to read first info-pages via "info make".

nop, i've already known how to do that!

>
> The small example i send, used already two phases of building. First
> compilation of (one) source file. In more real-life projects there are
> more source files to compile. Note: you must not compile the template
> definition files, even if they end with .cc (or .C). You should treat
> template definition files as header files (included from your template
> declaration files).
> The second phase is linking the program, as indicated by the second run
> of g++ in the example.
>
> With some knowledge about makefiles it should be straigt forward to
> compile your sources (with templates).
>

If i got a lot of sources definition files (.C or .cc or .cpp) some of
them are template definitions and some aren't. i have to compile with "-c"
option those files that do not have any template, and then link all
together with the second phase?

v.gr.
	Main.C Base.C Base.h Derived.C Derived.h Derived2.C Derived2.h
	Template.C Template.h Template2.C Template2.h

How do i compile with a makefile to only compile those files that were
modified & not to compile the whole project properly with a makefile?


cafe


> If i miss your point ... sorry. Don't heasetate to ask again.
>
> cu
> Matthias
>
> > cafe
> >
> >
> >
> >
> >
> >
> --
> Matthias Oltmanns
>
> Tel: 04421-1543-274
> mail: Mathias.Oltmanns.Oltmanns@sysde.eads.net
>
>



More information about the Gcc-help mailing list