From OpenTTD
Revision as of 17:07, 23 November 2012 by NG (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Compiling with DistCC is relatively easy, as long as you compile via the Makefile.

What is DistCC?

DistCC is a small program which allows cross-network compiling. In other words, instead of your PC alone doing to work, it sends out files to be compiled on other hosts. This way you can speed up your compile-time by a lot.

How to configure OpenTTD to use DistCC?


  • Run make first, wait till you see the language files compile, then stop it. This is needed so we have a Makefile.config.
  • Open Makefile.config.
  • Goto CC_TARGET=, change this in: CC_TARGET=distcc gcc <- where gcc is your compiler, see note below.
  • Goto CC_HOST, change this in CC_HOST=gcc <- where gcc is your compiler, see note below.
  • Save file, close.
  • Type make -jN, where N is the amounts of CPUs + 1 (or any other number, just don't put it to high).

Not all compilers can build files that your computer can read. This means you have to be very careful which hosts you use to help you out compiling. Gentoo has a nice solution for that: it doesn't use gcc, but, for example, i386-linux-pc-gnu-gcc. Every host that supports this platform has this file, and so distcc can compile perfectly. Not all distros have this solution, so don't be all too surprised if you get weird errors. Also, most distros support cross-compiling tools. Installing this on a slave can help out.

Personal tools