Skip to content
mtwilliams edited this page Sep 14, 2014 · 1 revision

Building Foundation is rather easy. It boils down to a few (standard) steps:

  1. Acquiring the necessary tools.

  2. Acquiring the source-code.

  3. Configuring (via ./configure).

  4. Compiling.

  5. Testing.

  6. Acquiring the necessary tools


Windows

To build the Foundation for Windows you are going to need:

Linux

To build Foundation for Linux you are going to need:

  • Git
  • GCC (and build essentials)
  • An appropriate implementation of the Standard C Library for the architecture you're targeting.
  1. Acquiring the source-code

Unless you intend on contributing to the project or require an unreleased patch you should use a release, or at the very least the master branch. If you are embedding Foundation into version control we suggest that you use a submodule and reference releases by their tags.

With that noted, simply perform a clone:

$ git clone https://github.com/bitbytestudios/foundation.git

And optionally checkout a relevant tag:

$ git checkout v0.1.0
  1. Configuring

Following conventions, we provide a Bash configure script. Whenever in doubt just run ./configure --usage or ./configure --help:

$ ./configure --help
Usage: configure [OPTIONS]
Generates a Makefile for a configuration.

  --configuration [configuration]   Specify a configuration to use: debug,
  --configuration=[configuration]   development, and release.

  --linkage [linkage]               Specify linkage: dynamic, static. 
  --linkage=[linkage]

  --platform [platform]             Specify a platform to target: windows,
  --platform=[platform]             macosx, linux, bsd, etc.

  --architecture [architecture]     Specify an architecture to target: x86,
  --architecture=[architecture]     x86-64, arm, etc.

  --help, --usage                   Displays this.

Report bugs on our issue tracker at:
 https://github.com/bitbytestudios/foundation/issues

We suggest that you compile Foundation outside of the source repository. To do so, simply call ./configure from target directory, e.g.:

$ pwd
~/code/engine/_build

$ ../deps/foundation/configure
Configured successfully!

$ make all
  1. Compiling and testing.

Once configured, compilation is easy. Simply run make.

If you need to specify or override certain behavior just define the appropriate environment variables prior to invoking make:

Windows

  • To compile with a certain version of Microsoft Visual C/C++ set VCInstallDir.
  • To compile with a certain version of the Microsoft Windows SDK set WindowsSdkDir.
  1. Testing

We provide a comprehensive test suite composed of unit and tests. To run the test suite simply invoke make test.

Clone this wiki locally