Skip to content
Michael Williams edited this page Sep 2, 2014 · 2 revisions

Building the libgamepad 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 libgamepad 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+.
  • And if you're using an old Windows SDK, a relevant DirectX SDK.
  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 libgamepad 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/libgamepad.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.

  --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 github.com/bitbytestudios/gamepad/issues.

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

$ pwd
~/code/engine/_build

$ ../deps/libgamepad/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

TODO

Clone this wiki locally