You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.4 KiB

  1. ::@echo off
  2. :: > Choose compile options
  3. :: -------------------------------
  4. :: Set desired OpenGL API version: 1.1, 2.1, 3.3
  5. set GRAPHICS_API=GRAPHICS_API_OPENGL_33
  6. :: .
  7. :: > Setup required Environment
  8. :: -------------------------------------
  9. set RAYLIB_DIR=C:\raylib
  10. set PATH=%PATH%;%RAYLIB_DIR%\mingw\bin
  11. cd %RAYLIB_DIR%\raylib\src
  12. :: .
  13. :: > Cleaning latest build
  14. :: ---------------------------
  15. cmd /c del /F *.o
  16. cmd /c del /F libraylib.a
  17. :: .
  18. :: > Compile raylib modules
  19. :: ------------------------------
  20. gcc -O2 -c rglfw.c -Wall -I. -Iexternal/glfw/include
  21. gcc -O2 -c core.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP -D%GRAPHICS_API%
  22. gcc -O2 -c shapes.c -std=c99 -Wall -DPLATFORM_DESKTOP
  23. gcc -O2 -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP
  24. gcc -O2 -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP
  25. gcc -O2 -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP
  26. gcc -O2 -c raudio.c -std=c99 -Wall -DPLATFORM_DESKTOP
  27. gcc -O2 -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP
  28. :: .
  29. :: . > Generate raylib library
  30. :: ------------------------------
  31. ar rcs libraylib.a core.o rglfw.o shapes.o textures.o text.o models.o raudio.o utils.o
  32. :: .
  33. :: > Installing raylib library
  34. :: -----------------------------
  35. cmd /c copy raylib.h %RAYLIB_DIR%\mingw\i686-w64-mingw32\include /Y
  36. cmd /c copy libraylib.a %RAYLIB_DIR%\mingw\i686-w64-mingw32\lib /Y
  37. :: .
  38. :: > Restore environment
  39. :: -----------------------------
  40. cd %~dp0