This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Makefile best practices for embedded development


Bryce Schober wrote:
We're working on an arm7 project with the gcc toolchain here, and currently our Makefiles are a mess. I've yet to get really going full-bore on this project, and I'd like to do some cleanup before I dive in. I've done a bit of research around the web including http://make.paulandlesley.org/autodep.html, and it looks promising, but there's a catch. What do you do about dependencies for assembly files? Doing gcc -M on my toolchain doesn't catch any includes. Ideally, we won't be using them much, but I'm planning on needing to do some optimized (assembly) fixed-point routines in assembly for our application. What is a good clean makefile solution that minimizes makefile maintenance and is embedded-friendly?

I don't have any specific advice there. When the project I was working on encountered a similar problem, we modified our assembler to generate dependencies. We weren't using gas, so that doesn't help you. This does seem like a good thing for gas (or gasp?) to do, though.


More generally, be sure to read "Recursive Make Considered Harmful", which you can get from http://aegis.sourceforge.net/auug97.pdf

Altenatively, for a much better tool that's harder to learn, and is unfortunately limited in host platforms, take a look at Vesta (http://www.vestasys.org). It captures dependencies on environment variables, library versions, and just about everything else that can affect the output bits, while also giving you a distributed build and detecting and reusing identical pieces.

- ken



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]