1.7 KiB
1.7 KiB
Sandbox
Gamedev Experiments
How to Build
Note
The makefile is configured for Linux only. Cross-compilation for Windows is planned.
Note
This project uses external libraries SDL2, GLEW, and cglm. To avoid depending on any Linux distro's package system, these libraries are built from source and linked statically, not dynamically. This makes the executable a few MB larger but also very portable. A few other small libraries are included directly in the
src/directory of this git repo.
- Build external libraries.
- SDL2:
- Download source code: I am using Release 2.32.10.
- If this project is located at
~/Code/Sandbox, place the source code for SDL2 at~/Code/SDL2. - Open a terminal in the SDL2 directory. Enter
./configureand thenmake.
- GLEW:
- Download source code here.
- Extract to
~/Code/glew. - Just enter
maketo build GLEW.
- cglm:
- Download source code: I am using Release 0.9.6
- Extract to
~/Code/cglm. - In a terminal,
./autogen.shthen./configureand finallymake.
- SDL2:
- Build the project.
- In the Sandbox directory, enter
maketo build the executable. - Symbolic links in
lib/andinclude/are used to find the header files and static archives of the external libraries that were prepared in the previous step. - Other commands are available:
make cleanto delete the executable and object files.make rebuildto clean and build in one step.make runto build and run in one step.make releaseto make a smaller executable suitable for distribution.
- In the Sandbox directory, enter