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.

143 lines
8.4 KiB

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