This is template for running raylib games and building them for web using emscripten or desktop
edit variables on top of Makefile before running command
# pick platform "WEB" or "DESKTOP"
RAYLIB_SETUP_PLATFORM="DESKTOP"
# set to true or false based on preferences
# RAYGUI raygui is immediate-mode-gui library.
RAYLIB_USE_RAYGUI=true
# RPNG is library to load/save png images and manage png chunks.
RAYLIB_USE_RPNG=false
# raudio is audio library based on miniaudio.
RAYLIB_USE_RAUDIO=false
# rres is file-format to package resources
RAYLIB_USE_RRES=false
# NBNET is library designed to implement client-server architecture
RAYLIB_USE_NBNET=false
make help # Show this help message
make deps # Download necessary dependencies and run setup_raylib_platform
make setup_raylib_platform # Setup raylib for the selected platform
make build # Build the project based on the selected platform
make web_run # Build and run web version with HTTP server
make desktop_run # Build and run desktop version
make clean # Clean the build and dependencies
before building anything remember to get needed libraries
make deps # Download necessary dependencies and run setup_raylib_platform
- change RAYLIB_SETUP_PLATFORM to “DESKTOP” in config on top of Makefile
- setup for desktop
make setup_raylib_platform # Setup raylib for the selected platform
- create build
make build # Build the project based on the selected platform
- or just run game
make desktop_run # Build and run desktop version
- change RAYLIB_SETUP_PLATFORM to “WEB” in config on top of Makefile
- setup for web
make setup_raylib_platform # Setup raylib for the selected platform
- create web build
make build # Build the project based on the selected platform
- You can start web server with python
make web_run # Build and run web version with HTTP server
- go to this address: http://0.0.0.0:8000/main.html
- gcc with all libraries (needed to build code)
- make (needed in build)
- git (needed to pull dependancies)
- bash (needed in order to run bash scripts)
- python3 (for running server)
- LINUX based operating system (untested on other)