Page 1 of 1

Multithread compilation and maxmod

Posted: Tue Oct 14, 2014 6:09 am
by Chano
Hi!

If i enable parallel compilation in the makefile with -j4, the build fails because a maxmod header is not found:

Code: Select all

fatal error: soundbank_bin.h: No such file or directory
 #include "soundbank_bin.h"
However, if I bash the build key a lot eventually the header is built and the compilation finishes successfully! :lol:

So... there's a way to force maxmod util to work with parallel builds?

Thanks a lot guys :)

Re: Multithread compilation and maxmod

Posted: Tue Oct 14, 2014 4:13 pm
by elhobbs
I am by no means a makefile expert, but it sounds like you might need a build rule for the header with a dependency on the soundbank - or some other dependency to make the sound bank processed first. this might fall into the category of - if you need to ask the question then you probably should not mess with it. does it really take all that long to build anyway?

Re: Multithread compilation and maxmod

Posted: Tue Oct 14, 2014 6:01 pm
by Chano
It seems that soundbank_bin.h is a little header which contains always the same code:

Code: Select all

extern const u8 soundbank_bin_end[];
extern const u8 soundbank_bin[];
extern const u32 soundbank_bin_size;
So replacing the header inclusion with its code allows me to use parallel compiling! :mrgreen:
elhobbs wrote:does it really take all that long to build anyway?
Not yet, but I'd like to do a c++11 project with some templates and some constexpr goodness, so maybe some day...