To build your raylib game for GNU/Linux you need to download raylib git repository and install some dependencies. raylib already comes with ready-to-use makefiles to compile source code, examples and templates that you can use on your projects.
This guide is for Ubuntu/Debian distros, that use APT as package manager; it is tested on Ubuntu 14.04.
This guide is for all GNU/Linux distros (I will use APT as package manager, for Debian based distros).
### Install basis and useful packages
You have to install GCC compilers, Make tool and git (for downloading raylib repository):
You have to install GCC compilers, Make tool and git (for downloading raylib repository).
sudo apt install build-essential git
@ -11,35 +11,44 @@ You have to install GCC compilers, Make tool and git (for downloading raylib rep
#### Install raylib dependencies
raylib requires GLFW3 (Windows and input management) and OpenAL Soft (audio system management). Just install them:
make PLATFORM=PLATFORM_DESKTOP # To make the static version.
make PLATFORM=PLATFORM_DESKTOP SHARED=YES # To make the dynamic shared version.
make PLATFORM=PLATFORM_WEB # To make web version.
_NOTE:_ By default raylib is compiled for OpenGL 3.3 Core graphics API backend; to compile for OpenGL 1.1 graphics API just type:
_NOTE:_ By default raylib is compiled for OpenGL 3.3 Core graphics API backend; to compile for OpenGL 1.1 graphics API just add `GRAPHICS=GRAPHICS_API_OPENGL_11` to the make command.
make PLATFORM=PLATFORM_DESKTOP GRAPHICS=GRAPHICS_API_OPENGL_11
If you want, you can install the library in the standard directories, or remove it:
If you want, you can move the library and header in standards directories:
sudo cp libraylib.a /usr/local/lib/libraylib.a
sudo mkdir /usr/local/include/raylib # If there is not the directory