POV-Ray : Newsgroups : povray.off-topic : Make it : Re: Make it Server Time
28 Jul 2024 04:21:51 EDT (-0400)
  Re: Make it  
From: Le Forgeron
Date: 27 May 2016 15:01:15
Message: <5748997b$1@news.povray.org>
Le 27/05/2016 19:59, Orchid Win7 v1 a écrit :
> On 27/05/2016 04:36 PM, Le_Forgeron wrote:
> 
>> Actually you can ask gcc/g++ to output the dependencies on sources files. Then you
can have them read back by "make".
> 
> Yes, this is the main thing I did.
> 
> Originally, the Makefile had one entry for every source file in the entire project,
some (but not all) listing the header files they depend on. (Hey, at least the exact
compilation command was a variable!)
> 
> I replaced that with a rule that says how to build any object file from a source
file. That crunched the file size down to a fraction of its former self. I also made
G++ spit out dependency information that then gets included back into the Makefile.
Our CI server probably
> won't care, but it'll help the next poor sod who tries to build it by hand.
> 
> Finally, I wrote some crazy Make macro [yes, Make has macros] that generates a list
of all the object files in a folder. Before they exist. So that I can depend on them.
> 
> ...and then I did it all over again, since apparently SO files have to be built with
-fPIC, whatever that does...

you can build .so and .a with the same .o (as -fPIC is not a problem for .a), one
compilation, two forms of library, if you really need them.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.