<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 1 Dec 2008, at 11:42, Matthijs Kooijman wrote:</div><br><blockquote type="cite"><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">While working on my own backend, I found that things got really messy real<br>quickly, partly caused by the fact that all .cpp files must be in the same<br>directory (lib/Target/TargetName). Simply putting code in different<br>directories and using DIRS in the Makefile doesn't cut it, since that produces<br>different libraries for each directory, which don't get linked in by the<br>programs that need them.</span></div></blockquote><br></div><div>For what it's worth, I have lib/Target compiling into one library. It works for building dynamic libraries, but I'm having some trouble with getting static archive builds to load targets. All subdirectories are included, identical base names should be handled gracefully, and compilation in a subdirectory will have all parent (sub)directories in their header search path.</div><div><br></div><div>A few examples of how I did it:</div><div><br></div><div><<a href="http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/lib/Target/Makefile#cl-10">http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/lib/Target/Makefile#cl-10</a>></div><<a href="http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.config.in#cl-82">http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.config.in#cl-82</a>><div><<a href="http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.rules#cl-532">http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.rules#cl-532</a>><div><<a href="http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.rules#cl-589">http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.rules#cl-589</a>></div><div><<a href="http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.rules#cl-607">http://www.bitbucket.org/danchr/llvm/src/253dfa2dabed/Makefile.rules#cl-607</a>></div><div><br></div><div>(The server seems rather slow when querying individual files; sorry…)</div><div><br><div apple-content-edited="true"> <div><div><div><div><div><div><div><div><div><div><div>--</div><div><br></div><div>Dan Villiom Podlaski Christiansen, stud. scient.</div><div><a href="mailto:danchr@gmail.com">danchr@gmail.com</a></div></div></div></div></div></div></div></div></div></div></div> </div><br></div></div></body></html>