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.

131 lines
7.2 KiB

  1. ��::basic_c_compilation
  2. echo > Setup required Environment
  3. echo -------------------------------------
  4. SET RAYLIB_DIR=C:\raylib
  5. ENV_SET PATH=$(RAYLIB_DIR)\mingw\bin
  6. SET CC=gcc
  7. cd $(CURRENT_DIRECTORY)
  8. echo
  9. echo > Saving Current File
  10. echo -------------------------
  11. npp_save
  12. echo
  13. echo > Compile simple C file
  14. echo ----------------------------
  15. $(CC) -o $(NAME_PART).exe $(FILE_NAME) -Wall -Wextra -std=c99
  16. echo
  17. echo > Reset Environment
  18. echo --------------------------
  19. ENV_UNSET PATH
  20. ::resource_file_compilation
  21. echo > Setup required Environment
  22. echo -------------------------------------
  23. SET RAYLIB_DIR=C:\raylib
  24. ENV_SET PATH=$(RAYLIB_DIR)\mingw\bin
  25. SET RESC=windres
  26. cd $(CURRENT_DIRECTORY)
  27. echo
  28. echo > Compile simple .rc file
  29. echo ----------------------------
  30. $(RESC) $(NAME_PART).rc -o $(NAME_PART).rc.data
  31. echo
  32. echo > Reset Environment
  33. echo --------------------------
  34. ENV_UNSET PATH
  35. ::raylib_compile_execute
  36. echo > Setup required Environment
  37. echo -------------------------------------
  38. SET RAYLIB_DIR=C:\raylib
  39. ENV_SET PATH=$(RAYLIB_DIR)\mingw\bin
  40. SET CC=gcc
  41. SET CFLAGS=$(RAYLIB_DIR)\raylib\src\raylib.rc.data -s -O2 -std=c99 -Wall
  42. SET LDFLAGS=-lraylib -lopengl32 -lgdi32 -lwinmm -Iexternal -Wl,--subsystem,windows
  43. cd $(CURRENT_DIRECTORY)
  44. echo
  45. echo > Clean latest build
  46. echo ------------------------
  47. cmd /c IF EXIST $(NAME_PART).exe del /F $(NAME_PART).exe
  48. echo
  49. echo > Saving Current File
  50. echo -------------------------
  51. npp_save
  52. echo
  53. echo > Compile program
  54. echo -----------------------
  55. $(CC) -o $(NAME_PART).exe $(FILE_NAME) $(CFLAGS) $(LDFLAGS)
  56. echo
  57. echo > Reset Environment
  58. echo --------------------------
  59. ENV_UNSET PATH
  60. echo
  61. echo > Execute program
  62. echo -----------------------
  63. cmd /c IF EXIST $(NAME_PART).exe $(NAME_PART).exe
  64. ::raylib_source_compile
  65. echo > Choose compile options
  66. echo -------------------------------
  67. echo Set desired OpenGL API version: 1.1, 2.1, 3.3
  68. SET GRAPHIC_API=GRAPHICS_API_OPENGL_33
  69. echo
  70. echo > Setup required Environment
  71. echo -------------------------------------
  72. SET RAYLIB_DIR=C:\raylib
  73. ENV_SET PATH=$(RAYLIB_DIR)\mingw\bin
  74. SET CC=gcc
  75. SET AR=ar
  76. SET CFLAGS=-std=c99 -Wall -DPLATFORM_DESKTOP -D$(GRAPHIC_API)
  77. SET RELEASEPATH=$(RAYLIB_DIR)\mingw\i686-w64-mingw32
  78. cd $(RAYLIB_DIR)\raylib\src
  79. echo
  80. echo > Clean latest build
  81. echo -----------------------
  82. cmd /c del /F *.o
  83. cmd /c del /F libraylib.a
  84. echo
  85. echo > Compile raylib modules
  86. echo ------------------------------
  87. $(CC) -c core.c -Iexternal/glfw/include $(CFLAGS)
  88. $(CC) -c rglfw.c $(CFLAGS)
  89. $(CC) -c shapes.c $(CFLAGS)
  90. $(CC) -c textures.c $(CFLAGS)
  91. $(CC) -c text.c $(CFLAGS)
  92. $(CC) -c models.c $(CFLAGS)
  93. $(CC) -c raudio.c $(CFLAGS)
  94. $(CC) -c utils.c $(CFLAGS)
  95. echo
  96. echo > Generate raylib library
  97. echo ------------------------------
  98. $(AR) rcs libraylib.a core.o rglfw.o shapes.o textures.o text.o models.o raudio.o utils.o
  99. echo
  100. echo > Install raylib library
  101. echo --------------------------
  102. cmd /c copy raylib.h $(RELEASEPATH)\include /Y
  103. cmd /c copy libraylib.a $(RELEASEPATH)\lib /Y
  104. echo
  105. echo > Reset Environment
  106. echo --------------------------
  107. ENV_UNSET PATH
  108. ::raylib_makefile
  109. echo > Choose compile options
  110. echo -------------------------------
  111. echo Set desired PLATFORM: DESKTOP, RPI, ANDROID, WEB
  112. SET PLATFORM=PLATFORM_DESKTOP
  113. echo
  114. echo > Setup required Environment
  115. echo -------------------------------------
  116. SET RAYLIB_PATH=C:\raylib
  117. ENV_SET PATH=$(RAYLIB_PATH)\mingw\bin
  118. SET MAKE=mingw32-make
  119. cd $(CURRENT_DIRECTORY)
  120. echo
  121. echo > Execute makefile
  122. echo -----------------------
  123. $(MAKE) PLATFORM=$(PLATFORM) -B
  124. echo
  125. echo > Reset Environment
  126. echo --------------------------
  127. ENV_UNSET PATH