選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

141 行
8.2 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\tcc
  6. ENV_SET PATH=$(COMPILER_PATH)
  7. SET CC=tcc
  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\tcc
  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. $(RESC) -DIDC_STATIC=-1 -O coff $(NAME_PART).rc -o $(NAME_PART).rc.data
  33. echo
  34. echo > Reset Environment
  35. echo --------------------------
  36. ENV_UNSET PATH
  37. ::raylib_compile_execute
  38. echo > Setup required Environment
  39. echo -------------------------------------
  40. SET RAYLIB_PATH=C:\raylib\raylib
  41. SET COMPILER_PATH=C:\raylib\tcc
  42. ENV_SET PATH=$(COMPILER_PATH)
  43. SET CC=tcc
  44. SET CFLAGS=$(RAYLIB_PATH)\src\raylib.rc.data -std=c99 -Wall -I$(RAYLIB_PATH)\src -Iexternal -DPLATFORM_DESKTOP
  45. SET LDFLAGS=-L$(RAYLIB_PATH)\src -lmsvcrt -lraylib -lopengl32 -lgdi32 -lwinmm -lkernel32 -lshell32 -luser32 -Wl,-subsystem=gui
  46. cd $(CURRENT_DIRECTORY)
  47. echo
  48. echo > Clean latest build
  49. echo ------------------------
  50. cmd /c IF EXIST $(NAME_PART).exe del /F $(NAME_PART).exe
  51. echo
  52. echo > Saving Current File
  53. echo -------------------------
  54. npp_save
  55. echo
  56. echo > Compile program
  57. echo -----------------------
  58. $(CC) -o $(NAME_PART).exe $(FILE_NAME) $(CFLAGS) $(LDFLAGS)
  59. echo
  60. echo > Reset Environment
  61. echo --------------------------
  62. ENV_UNSET PATH
  63. echo
  64. echo > Execute program
  65. echo -----------------------
  66. cmd /c IF EXIST $(NAME_PART).exe $(NAME_PART).exe
  67. ::raylib_source_compile
  68. echo > Choose compile options
  69. echo -------------------------------
  70. echo Set desired OpenGL API version: 1.1, 2.1, 3.3, 4.3
  71. SET GRAPHIC_API=GRAPHICS_API_OPENGL_33
  72. echo
  73. echo > Setup required Environment
  74. echo -------------------------------------
  75. SET RAYLIB_PATH=C:\raylib\raylib
  76. SET COMPILER_PATH=C:\raylib\tcc
  77. ENV_SET PATH=$(COMPILER_PATH)
  78. SET CC=tcc
  79. SET AR=tcc -ar
  80. SET CFLAGS=-std=c99 -Wall -DPLATFORM_DESKTOP -DSTBI_NO_SIMD -DMA_NO_WASAPI -D$(GRAPHIC_API)
  81. SET RELEASE_PATH=$(COMPILER_PATH)
  82. cd $(RAYLIB_PATH)\src
  83. echo
  84. echo > Clean latest build
  85. echo -----------------------
  86. cmd /c del /F *.o
  87. cmd /c del /F libraylib.a
  88. echo
  89. echo > Compile raylib modules
  90. echo ------------------------------
  91. $(CC) -c rcore.c -Iexternal/glfw/include $(CFLAGS)
  92. $(CC) -c rglfw.c $(CFLAGS)
  93. $(CC) -c rshapes.c $(CFLAGS)
  94. $(CC) -c rtextures.c $(CFLAGS)
  95. $(CC) -c rtext.c $(CFLAGS)
  96. $(CC) -c rmodels.c $(CFLAGS)
  97. $(CC) -c raudio.c $(CFLAGS)
  98. $(CC) -c utils.c $(CFLAGS)
  99. echo
  100. echo > Generate raylib library
  101. echo ------------------------------
  102. $(AR) rcs libraylib.a rcore.o rglfw.o rshapes.o rtextures.o rtext.o rmodels.o raudio.o utils.o
  103. echo
  104. echo > Install raylib library
  105. echo --------------------------
  106. cmd /c copy raylib.h $(RELEASE_PATH)\include /Y
  107. cmd /c copy libraylib.a $(RELEASE_PATH)\lib /Y
  108. echo
  109. echo > Reset Environment
  110. echo --------------------------
  111. ENV_UNSET PATH
  112. ::raylib_makefile
  113. echo > Choose compile options
  114. echo -------------------------------
  115. echo Set desired PLATFORM: DESKTOP, RPI, ANDROID, WEB
  116. SET PLATFORM=PLATFORM_DESKTOP
  117. echo
  118. echo > Setup required Environment
  119. echo -------------------------------------
  120. SET RAYLIB_PATH=C:\raylib\raylib
  121. SET COMPILER_PATH=C:\raylib\tcc
  122. ENV_SET PATH=$(COMPILER_PATH)
  123. SET MAKE=make
  124. cd $(CURRENT_DIRECTORY)
  125. echo
  126. echo WARNING: Makefile to be executed must be open and selected!
  127. echo
  128. echo > Execute makefile
  129. echo -----------------------
  130. //$(MAKE) clean
  131. $(MAKE) PLATFORM=$(PLATFORM) -B
  132. // Build a single example using raylib/examples/Makefile
  133. //$(MAKE) core/core_basic_window PLATFORM=$(PLATFORM) -B
  134. echo
  135. echo > Reset Environment
  136. echo --------------------------
  137. ENV_UNSET PATH