-
Notifications
You must be signed in to change notification settings - Fork 19
Building
Building the libgamepad 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 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.
- 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
- 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
- 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
TODO