-
Notifications
You must be signed in to change notification settings - Fork 0
Building
Building Foundation is rather easy. It boils down to a few (standard) steps:
-
Acquiring the necessary tools.
-
Acquiring the source-code.
-
Configuring (via
./configure
). -
Compiling.
-
Testing.
-
Acquiring the necessary tools
To build the Foundation for Windows you are going to need:
- MinGW/MSYS.
- Git.
- A version of Microsoft Visual C/C++. The latest Express Edition will do.
- A version of the Microsoft Windows SDK, preferably v7.1+.
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.
- 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
- 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
- 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
:
- 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
.
- Testing
We provide a comprehensive test suite composed of unit and tests. To run the test suite simply invoke make test
.