raylib/projects/Geany/raylib_compile_sources.bat

41 lines
1.4 KiB
Batchfile
Raw Normal View History

2018-11-22 14:29:33 +03:00
::@echo off
:: > Choose compile options
:: -------------------------------
:: Set desired OpenGL API version: 1.1, 2.1, 3.3
set GRAPHICS_API=GRAPHICS_API_OPENGL_33
:: .
:: > Setup required Environment
:: -------------------------------------
set RAYLIB_DIR=C:\raylib
2019-06-05 01:04:31 +03:00
set PATH=%PATH%;%RAYLIB_DIR%\mingw\bin
2018-11-22 14:29:33 +03:00
cd %RAYLIB_DIR%\raylib\src
:: .
:: > Cleaning latest build
:: ---------------------------
cmd /c del /F *.o
cmd /c del /F libraylib.a
:: .
:: > Compile raylib modules
:: ------------------------------
gcc -O2 -c rglfw.c -Wall -I. -Iexternal/glfw/include
gcc -O2 -c core.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP -D%GRAPHICS_API%
gcc -O2 -c shapes.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c raudio.c -std=c99 -Wall -DPLATFORM_DESKTOP
2018-11-22 14:29:33 +03:00
gcc -O2 -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP
2018-12-21 02:17:44 +03:00
2018-11-22 14:29:33 +03:00
:: .
:: . > Generate raylib library
:: ------------------------------
ar rcs libraylib.a core.o rglfw.o shapes.o textures.o text.o models.o raudio.o utils.o
2018-11-22 14:29:33 +03:00
:: .
:: > Installing raylib library
:: -----------------------------
2019-06-05 01:04:31 +03:00
cmd /c copy raylib.h %RAYLIB_DIR%\mingw\i686-w64-mingw32\include /Y
cmd /c copy libraylib.a %RAYLIB_DIR%\mingw\i686-w64-mingw32\lib /Y
2018-11-22 14:29:33 +03:00
:: .
:: > Restore environment
:: -----------------------------
cd %~dp0