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.

132 lines
7.3 KiB

  1. ��::basic_c_compilation
  2. echo > Setup required Environment
  3. echo -------------------------------------
  4. SET RAYLIB_DIR=C:\raylib
  5. ENV_SET PATH=$(RAYLIB_DIR)\tcc
  6. SET CC=tcc
  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)\tcc
  25. SET RESC=windres
  26. cd $(CURRENT_DIRECTORY)
  27. echo
  28. echo > Compile simple .rc file
  29. echo ----------------------------
  30. $(RESC) -DIDC_STATIC=-1 -O coff $(NAME_PART).rc -o $(NAME_PART).rc.o
  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)\tcc
  40. SET CC=tcc
  41. SET CFLAGS=$(RAYLIB_DIR)\raylib\raylib.rc.data -std=c99 -Wall
  42. SET LDFLAGS=-lmsvcrt -lraylib -lopengl32 -lgdi32 -lwinmm -lkernel32 -lshell32 -luser32 -Wl,-subsystem=gui
  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)\tcc
  74. SET CC=tcc
  75. SET AR=tcc -ar
  76. SET CFLAGS=-std=c99 -Wall -DPLATFORM_DESKTOP -DSTBI_NO_SIMD -DMAL_NO_WASAPI -D$(GRAPHIC_API)
  77. SET RELEASEPATH=$(RAYLIB_DIR)\tcc
  78. //cd $(RAYLIB_DIR)\raylib\src
  79. cd $(CURRENT_DIRECTORY)
  80. echo
  81. echo > Clean latest build
  82. echo -----------------------
  83. cmd /c del /F *.o
  84. cmd /c del /F libraylib.a
  85. echo
  86. echo > Compile raylib modules
  87. echo ------------------------------
  88. $(CC) -c core.c -Iexternal/glfw/include $(CFLAGS)
  89. $(CC) -c rglfw.c $(CFLAGS)
  90. $(CC) -c shapes.c $(CFLAGS)
  91. $(CC) -c textures.c $(CFLAGS)
  92. $(CC) -c text.c $(CFLAGS)
  93. $(CC) -c models.c $(CFLAGS)
  94. $(CC) -c raudio.c $(CFLAGS)
  95. $(CC) -c utils.c $(CFLAGS)
  96. echo
  97. echo > Generate raylib library
  98. echo ------------------------------
  99. $(AR) rcs libraylib.a core.o rglfw.o shapes.o textures.o text.o models.o audio.o utils.o
  100. echo
  101. echo > Install raylib library
  102. echo --------------------------
  103. cmd /c copy raylib.h $(RELEASEPATH)\include /Y
  104. cmd /c copy libraylib.a $(RELEASEPATH)\lib /Y
  105. echo
  106. echo > Reset Environment
  107. echo --------------------------
  108. ENV_UNSET PATH
  109. ::raylib_makefile
  110. echo > Choose compile options
  111. echo -------------------------------
  112. echo Set desired PLATFORM: DESKTOP, RPI, ANDROID, WEB
  113. SET PLATFORM=PLATFORM_DESKTOP
  114. echo
  115. echo > Setup required Environment
  116. echo -------------------------------------
  117. SET RAYLIB_PATH=C:\raylib
  118. ENV_SET PATH=$(RAYLIB_PATH)\tcc
  119. SET MAKE=make
  120. cd $(CURRENT_DIRECTORY)
  121. echo
  122. echo > Execute makefile
  123. echo -----------------------
  124. $(MAKE) PLATFORM=$(PLATFORM) -B
  125. echo
  126. echo > Reset Environment
  127. echo --------------------------
  128. ENV_UNSET PATH