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.

174 lines
12 KiB

  1. ��::basic_c_compilation
  2. echo > Setup required Environment
  3. echo -------------------------------------
  4. SET RAYLIB_DIR=C:\raylib
  5. ENV_SET PATH=$(RAYLIB_DIR)\mingw32\bin
  6. cd $(CURRENT_DIRECTORY)
  7. echo
  8. echo > Compile simple C file
  9. echo ----------------------------
  10. gcc -o $(NAME_PART).exe $(FILE_NAME) -Wall -std=c99
  11. echo
  12. echo > Reset Environment
  13. echo --------------------------
  14. ENV_UNSET PATH
  15. ::raylib_compile_execute
  16. echo > Setup required Environment
  17. echo -------------------------------------
  18. SET RAYLIB_DIR=C:\raylib
  19. ENV_SET PATH=$(RAYLIB_DIR)\mingw32\bin
  20. cd $(CURRENT_DIRECTORY)
  21. echo
  22. echo > Cleaning latest build
  23. echo ---------------------------
  24. cmd /c IF EXIST $(NAME_PART).exe del /F $(NAME_PART).exe
  25. echo
  26. echo > Compiling program
  27. echo --------------------------
  28. gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib.rc.o -I../../src -Iexternal -static -lraylib -lopengl32 -lgdi32 -lwinmm -std=c99
  29. echo
  30. echo > Reset Environment
  31. echo --------------------------
  32. ENV_UNSET PATH
  33. echo
  34. echo > Executing program
  35. echo -------------------------
  36. cmd /c IF EXIST $(NAME_PART).exe $(NAME_PART).exe
  37. ::raylib_makefile
  38. echo > Choose compile options
  39. echo -------------------------------
  40. echo Set desired PLATFORM: DESKTOP, RPI, ANDROID, WEB
  41. SET PLATFORM=PLATFORM_DESKTOP
  42. echo
  43. echo > Setup required Environment
  44. echo -------------------------------------
  45. SET RAYLIB_PATH=C:\raylib
  46. ENV_SET PATH=$(RAYLIB_PATH)\mingw32\bin
  47. cd $(CURRENT_DIRECTORY)
  48. echo
  49. echo > Execute makefile
  50. echo -----------------------
  51. mingw32-make PLATFORM=$(PLATFORM) -B
  52. echo
  53. echo > Reset Environment
  54. echo --------------------------
  55. ENV_UNSET PATH
  56. ::raylib_source_compile
  57. echo > Choose compile options
  58. echo -------------------------------
  59. echo Set desired OpenGL API version: 1.1, 2.1, 3.3
  60. SET GRAPHIC_API=GRAPHICS_API_OPENGL_33
  61. echo
  62. echo > Setup required Environment
  63. echo -------------------------------------
  64. SET RAYLIB_DIR=C:\raylib
  65. ENV_SET PATH=$(RAYLIB_DIR)\mingw32\bin
  66. //cd $(RAYLIB_DIR)\raylib\src
  67. cd $(CURRENT_DIRECTORY)
  68. echo
  69. echo > Cleaning latest build
  70. echo ---------------------------
  71. cmd /c del /F *.o
  72. cmd /c del /F libraylib.a
  73. echo
  74. echo > Compile raylib modules
  75. echo ------------------------------
  76. gcc -O2 -c rglfw.c -Wall -I. -Iexternal/glfw/include
  77. gcc -O2 -c core.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP
  78. gcc -O2 -c rlgl.c -std=c99 -Wall -D$(GRAPHIC_API)
  79. gcc -O2 -c shapes.c -std=c99 -Wall -DPLATFORM_DESKTOP
  80. gcc -O2 -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP
  81. gcc -O2 -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP
  82. gcc -O2 -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP
  83. gcc -O2 -c audio.c -std=c99 -Wall -DPLATFORM_DESKTOP
  84. gcc -O2 -c external/stb_vorbis.c -Wall -I.
  85. gcc -O2 -c external/mini_al.c -Wall -I.
  86. gcc -O2 -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP
  87. echo
  88. echo > Generate raylib library
  89. echo ------------------------------
  90. ar rcs libraylib.a core.o rglfw.o rlgl.o shapes.o textures.o text.o models.o audio.o mini_al.o stb_vorbis.o utils.o
  91. echo
  92. echo > Installing raylib library
  93. echo -----------------------------
  94. cmd /c copy raylib.h $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\include /Y
  95. cmd /c copy libraylib.a $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\lib /Y
  96. cmd /c copy raylib.h ..\release\include\raylib.h /Y
  97. cmd /c copy libraylib.a ..\release\libs\win32\mingw32\libraylib.a /Y
  98. echo
  99. echo > Reset Environment
  100. echo --------------------------
  101. ENV_UNSET PATH
  102. ::raylib_source_compile_tcc
  103. echo > Choose compile options
  104. echo -------------------------------
  105. echo Set desired OpenGL API version: 1.1, 2.1, 3.3
  106. SET GRAPHIC_API=GRAPHICS_API_OPENGL_33
  107. echo
  108. echo > Setup required Environment
  109. echo -------------------------------------
  110. SET RAYLIB_DIR=C:\raylib
  111. ENV_SET PATH=$(RAYLIB_DIR)\tcc
  112. //cd $(RAYLIB_DIR)\raylib\src
  113. cd $(CURRENT_DIRECTORY)
  114. echo
  115. echo > Cleaning latest build
  116. echo ---------------------------
  117. cmd /c del /F *.o
  118. cmd /c del /F libraylib.a
  119. echo
  120. echo > Compile raylib modules
  121. echo ------------------------------
  122. tcc -c rglfw.c -Wall -I. -Iexternal/glfw/include
  123. tcc -c core.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP
  124. tcc -c rlgl.c -std=c99 -Wall -D$(GRAPHIC_API)
  125. tcc -c shapes.c -std=c99 -Wall -DPLATFORM_DESKTOP
  126. tcc -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP
  127. tcc -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP
  128. tcc -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP
  129. tcc -c audio.c -std=c99 -Wall -DPLATFORM_DESKTOP
  130. tcc -c external/stb_vorbis.c -Wall -I.
  131. tcc -c external/mini_al.c -Wall -I.
  132. tcc -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP
  133. echo
  134. echo > Generate raylib library
  135. echo ------------------------------
  136. tcc -ar rcs libraylib.a core.o rglfw.o rlgl.o shapes.o textures.o text.o models.o utils.o audio.o mini_al.o stb_vorbis.o utils.o
  137. echo
  138. echo > Installing raylib library
  139. echo -----------------------------
  140. cmd /c copy raylib.h $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\include /Y
  141. cmd /c copy libraylib.a $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\lib /Y
  142. cmd /c copy raylib.h ..\release\include\raylib.h /Y
  143. cmd /c copy libraylib.a ..\release\libs\win32\mingw32\libraylib.a /Y
  144. echo
  145. echo > Reset Environment
  146. echo --------------------------
  147. ENV_UNSET PATH
  148. ::raylib_compile_execute_tcc
  149. echo > Setup required Environment
  150. echo -------------------------------------
  151. SET RAYLIB_DIR=C:\raylib
  152. ENV_SET PATH=$(RAYLIB_DIR)\tcc
  153. cd $(CURRENT_DIRECTORY)
  154. echo
  155. echo > Cleaning latest build
  156. echo ---------------------------
  157. cmd /c IF EXIST $(NAME_PART).exe del /F $(NAME_PART).exe
  158. echo
  159. echo > Compiling program
  160. echo --------------------------
  161. tcc -o $(NAME_PART).exe $(FILE_NAME) -s -IC:\GitHub/raylib/src -LC:\GitHub/raylib/src -lraylib -lopengl32 -lgdi32 -std=c99 -Wall
  162. echo
  163. echo > Reset Environment
  164. echo --------------------------
  165. ENV_UNSET PATH
  166. echo
  167. echo > Executing program
  168. echo -------------------------
  169. cmd /c IF EXIST $(NAME_PART).exe $(NAME_PART).exe