ok, so one starts a new project, from scratch. Empty dir. This project must be laid out so that the programmers can work with it and test it, it must sport most likely something like the libraries the project is going to be dependent on and that will be added to the delivered package, it must have a set of scripts and techniques to make the program compile on the target platforms one ships to, and so on. This is such a common problem, but never in my career of programming I've met the "proper way to do it". Plenty of books on proper code design and testing and code style, but never I found an example of actual industrial-level deployment from source to product. Everyone reimplements his own solution, oftenmost a huge hack which stays together with spit.
I simply don't believe this is a problem that is not documented or explained everywhere, and I also think that it's an important and well presented issue that any programmer that is involved in shipping an application, and not just coding it, must face potentially at a very complex level, since a single error may mean inability to compile on a new platform, to test, shipping the wrong files and so on. It is a programming question that most likely has a well definite answer, which can range from "The best practices are defined in this book, or this website" to "this package which is publicly accessible uses a strategy which is the recommended best practice for such application". I can accept if nobody answers because nobody knows the answer, but I can't accept that the question is not fit for this site.