koffi 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/ChangeLog.md +6 -0
  2. package/build/qemu/2.1.2/koffi_darwin_arm64.tar.gz +0 -0
  3. package/build/qemu/2.1.2/koffi_darwin_x64.tar.gz +0 -0
  4. package/build/qemu/2.1.2/koffi_freebsd_arm64.tar.gz +0 -0
  5. package/build/qemu/2.1.2/koffi_freebsd_ia32.tar.gz +0 -0
  6. package/build/qemu/2.1.2/koffi_freebsd_x64.tar.gz +0 -0
  7. package/build/qemu/2.1.2/koffi_linux_arm32hf.tar.gz +0 -0
  8. package/build/qemu/2.1.2/koffi_linux_arm64.tar.gz +0 -0
  9. package/build/qemu/2.1.2/koffi_linux_ia32.tar.gz +0 -0
  10. package/build/qemu/2.1.2/koffi_linux_riscv64hf64.tar.gz +0 -0
  11. package/build/qemu/2.1.2/koffi_linux_x64.tar.gz +0 -0
  12. package/build/qemu/2.1.2/koffi_openbsd_ia32.tar.gz +0 -0
  13. package/build/qemu/2.1.2/koffi_openbsd_x64.tar.gz +0 -0
  14. package/build/qemu/2.1.2/koffi_win32_arm64.tar.gz +0 -0
  15. package/build/qemu/2.1.2/koffi_win32_ia32.tar.gz +0 -0
  16. package/build/qemu/2.1.2/koffi_win32_x64.tar.gz +0 -0
  17. package/doc/templates/badges.html +3 -0
  18. package/package.json +2 -2
  19. package/src/abi_arm64.cc +35 -1
  20. package/src/abi_x64_win.cc +2 -8
  21. package/src/abi_x86.cc +1 -7
  22. package/src/ffi.hh +1 -1
  23. package/src/util.hh +6 -0
  24. package/test/raylib.js +37 -5
  25. package/vendor/libcc/libcc.cc +430 -196
  26. package/vendor/libcc/libcc.hh +1417 -1283
  27. package/vendor/raylib/BINDINGS.md +87 -70
  28. package/vendor/raylib/CHANGELOG +263 -50
  29. package/vendor/raylib/CMakeLists.txt +12 -0
  30. package/vendor/raylib/CMakeOptions.txt +8 -1
  31. package/vendor/raylib/CONVENTIONS.md +2 -3
  32. package/vendor/raylib/FAQ.md +137 -0
  33. package/vendor/raylib/HISTORY.md +62 -29
  34. package/vendor/raylib/LICENSE +1 -1
  35. package/vendor/raylib/README.md +22 -17
  36. package/vendor/raylib/ROADMAP.md +8 -7
  37. package/vendor/raylib/cmake/CompileDefinitions.cmake +19 -15
  38. package/vendor/raylib/cmake/GlfwImport.cmake +2 -0
  39. package/vendor/raylib/cmake/LibraryConfigurations.cmake +22 -16
  40. package/vendor/raylib/cmake/raylib-config.cmake +52 -49
  41. package/vendor/raylib/examples/CMakeLists.txt +14 -9
  42. package/vendor/raylib/examples/Makefile +112 -125
  43. package/vendor/raylib/examples/Makefile.Android +1 -1
  44. package/vendor/raylib/examples/Makefile.Web +145 -158
  45. package/vendor/raylib/examples/README.md +141 -141
  46. package/vendor/raylib/examples/audio/audio_module_playing.c +9 -4
  47. package/vendor/raylib/examples/audio/audio_multichannel_sound.c +8 -3
  48. package/vendor/raylib/examples/audio/audio_music_stream.c +16 -11
  49. package/vendor/raylib/examples/audio/audio_raw_stream.c +57 -9
  50. package/vendor/raylib/examples/audio/audio_sound_loading.c +8 -3
  51. package/vendor/raylib/examples/audio/audio_stream_effects.c +179 -0
  52. package/vendor/raylib/examples/audio/audio_stream_effects.png +0 -0
  53. package/vendor/raylib/examples/build.zig +17 -6
  54. package/vendor/raylib/examples/core/core_2d_camera.c +8 -4
  55. package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.c +105 -0
  56. package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.png +0 -0
  57. package/vendor/raylib/examples/core/core_2d_camera_platformer.c +11 -6
  58. package/vendor/raylib/examples/core/core_3d_camera_first_person.c +9 -4
  59. package/vendor/raylib/examples/core/core_3d_camera_free.c +9 -4
  60. package/vendor/raylib/examples/core/core_3d_camera_mode.c +8 -3
  61. package/vendor/raylib/examples/core/core_3d_picking.c +9 -4
  62. package/vendor/raylib/examples/core/core_basic_screen_manager.c +9 -7
  63. package/vendor/raylib/examples/core/core_basic_window.c +8 -3
  64. package/vendor/raylib/examples/core/core_basic_window_web.c +13 -11
  65. package/vendor/raylib/examples/core/core_custom_frame_control.c +9 -4
  66. package/vendor/raylib/examples/core/core_custom_logging.c +12 -8
  67. package/vendor/raylib/examples/core/core_drop_files.c +20 -12
  68. package/vendor/raylib/examples/core/core_input_gamepad.c +20 -15
  69. package/vendor/raylib/examples/core/core_input_gestures.c +19 -15
  70. package/vendor/raylib/examples/core/core_input_keys.c +8 -3
  71. package/vendor/raylib/examples/core/core_input_mouse.c +8 -3
  72. package/vendor/raylib/examples/core/core_input_mouse_wheel.c +8 -3
  73. package/vendor/raylib/examples/core/core_input_multitouch.c +8 -3
  74. package/vendor/raylib/examples/core/core_loading_thread.c +10 -6
  75. package/vendor/raylib/examples/core/core_random_values.c +8 -3
  76. package/vendor/raylib/examples/core/core_scissor_test.c +8 -3
  77. package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +9 -4
  78. package/vendor/raylib/examples/core/core_split_screen.c +8 -3
  79. package/vendor/raylib/examples/core/core_storage_values.c +109 -3
  80. package/vendor/raylib/examples/core/core_vr_simulator.c +15 -7
  81. package/vendor/raylib/examples/core/core_window_flags.c +8 -3
  82. package/vendor/raylib/examples/core/core_window_letterbox.c +13 -18
  83. package/vendor/raylib/examples/core/core_window_should_close.c +77 -0
  84. package/vendor/raylib/examples/core/core_window_should_close.png +0 -0
  85. package/vendor/raylib/examples/core/core_world_screen.c +9 -4
  86. package/vendor/raylib/examples/examples_template.c +8 -3
  87. package/vendor/raylib/examples/models/models_animation.c +11 -7
  88. package/vendor/raylib/examples/models/models_billboard.c +9 -4
  89. package/vendor/raylib/examples/models/models_box_collisions.c +8 -3
  90. package/vendor/raylib/examples/models/models_cubicmap.c +9 -4
  91. package/vendor/raylib/examples/models/models_first_person_maze.c +9 -4
  92. package/vendor/raylib/examples/models/models_geometric_shapes.c +8 -3
  93. package/vendor/raylib/examples/models/models_heightmap.c +9 -4
  94. package/vendor/raylib/examples/models/models_loading.c +21 -17
  95. package/vendor/raylib/examples/models/models_loading_gltf.c +15 -41
  96. package/vendor/raylib/examples/models/models_loading_vox.c +9 -4
  97. package/vendor/raylib/examples/models/models_mesh_generation.c +71 -58
  98. package/vendor/raylib/examples/models/models_mesh_picking.c +25 -7
  99. package/vendor/raylib/examples/models/models_orthographic_projection.c +8 -5
  100. package/vendor/raylib/examples/models/models_rlgl_solar_system.c +6 -4
  101. package/vendor/raylib/examples/models/models_skybox.c +16 -12
  102. package/vendor/raylib/examples/models/models_waving_cubes.c +9 -4
  103. package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +12 -7
  104. package/vendor/raylib/examples/models/resources/LICENSE.md +9 -10
  105. package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +2 -23
  106. package/vendor/raylib/examples/models/resources/models/gltf/{raylib_32x32.glb → raylib_logo_3d.glb} +0 -0
  107. package/vendor/raylib/examples/models/resources/models/gltf/robot.blend +0 -0
  108. package/vendor/raylib/examples/models/resources/models/gltf/robot.glb +0 -0
  109. package/vendor/raylib/examples/others/easings_testbed.c +10 -8
  110. package/vendor/raylib/examples/others/easings_testbed.png +0 -0
  111. package/vendor/raylib/examples/others/embedded_files_loading.c +10 -5
  112. package/vendor/raylib/examples/others/embedded_files_loading.png +0 -0
  113. package/vendor/raylib/examples/others/raylib_opengl_interop.c +10 -6
  114. package/vendor/raylib/{src/extras/easings.h → examples/others/reasings.h} +38 -38
  115. package/vendor/raylib/examples/others/rlgl_compute_shader.c +21 -20
  116. package/vendor/raylib/examples/others/rlgl_compute_shader.png +0 -0
  117. package/vendor/raylib/examples/others/rlgl_standalone.c +4 -4
  118. package/vendor/raylib/examples/others/rlgl_standalone.png +0 -0
  119. package/vendor/raylib/examples/raylib_compile_execute.bat +2 -2
  120. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +1 -1
  121. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/{base_lighting_instanced.vs → lighting_instancing.vs} +2 -2
  122. package/vendor/raylib/examples/shaders/rlights.h +14 -27
  123. package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +24 -26
  124. package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +10 -5
  125. package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +13 -8
  126. package/vendor/raylib/examples/shaders/shaders_fog.c +8 -12
  127. package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +10 -5
  128. package/vendor/raylib/examples/shaders/shaders_julia_set.c +9 -4
  129. package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +45 -119
  130. package/vendor/raylib/examples/shaders/shaders_model_shader.c +10 -5
  131. package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +8 -3
  132. package/vendor/raylib/examples/shaders/shaders_palette_switch.c +8 -3
  133. package/vendor/raylib/examples/shaders/shaders_postprocessing.c +9 -4
  134. package/vendor/raylib/examples/shaders/shaders_raymarching.c +14 -11
  135. package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +8 -3
  136. package/vendor/raylib/examples/shaders/shaders_simple_mask.c +10 -5
  137. package/vendor/raylib/examples/shaders/shaders_spotlight.c +10 -6
  138. package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +9 -4
  139. package/vendor/raylib/examples/shaders/shaders_texture_outline.c +8 -3
  140. package/vendor/raylib/examples/shaders/shaders_texture_waves.c +8 -3
  141. package/vendor/raylib/{src/extras → examples/shapes}/raygui.h +1290 -1141
  142. package/vendor/raylib/examples/{others/easings.h → shapes/reasings.h} +40 -40
  143. package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +8 -3
  144. package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +8 -3
  145. package/vendor/raylib/examples/shapes/shapes_collision_area.c +10 -4
  146. package/vendor/raylib/examples/shapes/shapes_colors_palette.c +8 -3
  147. package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +9 -4
  148. package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +9 -4
  149. package/vendor/raylib/examples/shapes/shapes_draw_ring.c +10 -6
  150. package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +9 -4
  151. package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +9 -4
  152. package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +9 -4
  153. package/vendor/raylib/examples/shapes/shapes_following_eyes.c +8 -3
  154. package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +8 -3
  155. package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +8 -3
  156. package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +8 -3
  157. package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +14 -5
  158. package/vendor/raylib/examples/shapes/shapes_top_down_lights.c +355 -0
  159. package/vendor/raylib/examples/shapes/shapes_top_down_lights.png +0 -0
  160. package/vendor/raylib/examples/text/resources/DotGothic16-Regular.ttf +0 -0
  161. package/vendor/raylib/examples/text/resources/DotGothic16-Regular_OFL.txt +93 -0
  162. package/vendor/raylib/examples/text/resources/LICENSE.md +1 -1
  163. package/vendor/raylib/examples/text/text_codepoints_loading.c +138 -0
  164. package/vendor/raylib/examples/text/text_codepoints_loading.png +0 -0
  165. package/vendor/raylib/examples/text/text_draw_3d.c +42 -33
  166. package/vendor/raylib/examples/text/text_font_filters.c +14 -11
  167. package/vendor/raylib/examples/text/text_font_loading.c +9 -4
  168. package/vendor/raylib/examples/text/text_font_sdf.c +9 -4
  169. package/vendor/raylib/examples/text/text_font_spritefont.c +12 -6
  170. package/vendor/raylib/examples/text/text_format_text.c +8 -3
  171. package/vendor/raylib/examples/text/text_input_box.c +8 -3
  172. package/vendor/raylib/examples/text/text_raylib_fonts.c +9 -4
  173. package/vendor/raylib/examples/text/text_rectangle_bounds.c +9 -5
  174. package/vendor/raylib/examples/text/text_unicode.c +9 -7
  175. package/vendor/raylib/examples/text/text_writing_anim.c +8 -3
  176. package/vendor/raylib/examples/textures/resources/scarfy_run.gif +0 -0
  177. package/vendor/raylib/examples/textures/textures_background_scrolling.c +8 -3
  178. package/vendor/raylib/examples/textures/textures_blend_modes.c +8 -3
  179. package/vendor/raylib/examples/textures/textures_bunnymark.c +8 -3
  180. package/vendor/raylib/examples/textures/textures_draw_tiled.c +14 -10
  181. package/vendor/raylib/examples/textures/textures_fog_of_war.c +154 -0
  182. package/vendor/raylib/examples/textures/textures_fog_of_war.png +0 -0
  183. package/vendor/raylib/examples/textures/textures_gif_player.c +121 -0
  184. package/vendor/raylib/examples/textures/textures_gif_player.png +0 -0
  185. package/vendor/raylib/examples/textures/textures_image_drawing.c +8 -3
  186. package/vendor/raylib/examples/textures/textures_image_generation.c +8 -3
  187. package/vendor/raylib/examples/textures/textures_image_loading.c +8 -3
  188. package/vendor/raylib/examples/textures/textures_image_processing.c +8 -3
  189. package/vendor/raylib/examples/textures/textures_image_text.c +8 -3
  190. package/vendor/raylib/examples/textures/textures_logo_raylib.c +8 -3
  191. package/vendor/raylib/examples/textures/textures_mouse_painting.c +9 -4
  192. package/vendor/raylib/examples/textures/textures_npatch_drawing.c +8 -3
  193. package/vendor/raylib/examples/textures/textures_particles_blending.c +8 -3
  194. package/vendor/raylib/examples/textures/textures_polygon.c +9 -5
  195. package/vendor/raylib/examples/textures/textures_raw_data.c +8 -3
  196. package/vendor/raylib/examples/textures/{textures_rectangle.c → textures_sprite_anim.c} +11 -5
  197. package/vendor/raylib/examples/textures/{textures_rectangle.png → textures_sprite_anim.png} +0 -0
  198. package/vendor/raylib/examples/textures/textures_sprite_button.c +8 -3
  199. package/vendor/raylib/examples/textures/textures_sprite_explosion.c +8 -3
  200. package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +8 -3
  201. package/vendor/raylib/examples/textures/textures_to_image.c +8 -3
  202. package/vendor/raylib/parser/LICENSE +1 -1
  203. package/vendor/raylib/parser/Makefile +28 -0
  204. package/vendor/raylib/parser/README.md +49 -5
  205. package/vendor/raylib/parser/output/raylib_api.json +10717 -0
  206. package/vendor/raylib/parser/output/raylib_api.lua +7435 -0
  207. package/vendor/raylib/parser/{raylib_api.txt → output/raylib_api.txt} +1371 -824
  208. package/vendor/raylib/parser/{raylib_api.xml → output/raylib_api.xml} +827 -595
  209. package/vendor/raylib/parser/raylib_parser.c +1174 -196
  210. package/vendor/raylib/projects/4coder/Makefile +2 -4
  211. package/vendor/raylib/projects/4coder/main.c +0 -1
  212. package/vendor/raylib/projects/CMake/CMakeLists.txt +13 -16
  213. package/vendor/raylib/projects/CMake/README.md +27 -0
  214. package/vendor/raylib/projects/CMake/core_basic_window.c +52 -31
  215. package/vendor/raylib/projects/CodeBlocks/README.md +4 -4
  216. package/vendor/raylib/projects/Geany/core_basic_window.c +1 -1
  217. package/vendor/raylib/projects/Notepad++/c_raylib.xml +168 -128
  218. package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
  219. package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
  220. package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
  221. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +168 -84
  222. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +67 -51
  223. package/vendor/raylib/projects/README.md +1 -1
  224. package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +1 -1
  225. package/vendor/raylib/projects/VSCode/Makefile +8 -11
  226. package/vendor/raylib/projects/VSCode/main.c +53 -26
  227. package/vendor/raylib/projects/VSCode/resources/LICENSE +1 -0
  228. package/vendor/raylib/projects/scripts/build-linux.sh +6 -6
  229. package/vendor/raylib/projects/scripts/build-osx.sh +6 -6
  230. package/vendor/raylib/projects/scripts/build-rpi.sh +6 -6
  231. package/vendor/raylib/projects/scripts/build-windows.bat +2 -2
  232. package/vendor/raylib/src/CMakeLists.txt +6 -7
  233. package/vendor/raylib/src/Makefile +209 -103
  234. package/vendor/raylib/src/build.zig +56 -20
  235. package/vendor/raylib/src/config.h +32 -27
  236. package/vendor/raylib/src/external/cgltf.h +342 -104
  237. package/vendor/raylib/src/external/dr_wav.h +487 -225
  238. package/vendor/raylib/src/external/glfw/src/posix_time.c +1 -3
  239. package/vendor/raylib/src/external/glfw/src/wl_init.c +1 -3
  240. package/vendor/raylib/src/external/jar_xm.h +2 -1
  241. package/vendor/raylib/src/external/miniaudio.h +62251 -42061
  242. package/vendor/raylib/src/external/qoi.h +671 -0
  243. package/vendor/raylib/src/external/stb_vorbis.h +1 -1
  244. package/vendor/raylib/src/external/vox_loader.h +30 -25
  245. package/vendor/raylib/src/minshell.html +82 -0
  246. package/vendor/raylib/src/raudio.c +359 -201
  247. package/vendor/raylib/src/raylib.dll.rc +5 -5
  248. package/vendor/raylib/src/raylib.dll.rc.data +0 -0
  249. package/vendor/raylib/src/raylib.h +95 -63
  250. package/vendor/raylib/src/raylib.rc +5 -5
  251. package/vendor/raylib/src/raylib.rc.data +0 -0
  252. package/vendor/raylib/src/raymath.h +391 -133
  253. package/vendor/raylib/src/rcamera.h +32 -41
  254. package/vendor/raylib/src/rcore.c +775 -471
  255. package/vendor/raylib/src/rgestures.h +5 -5
  256. package/vendor/raylib/src/rglfw.c +3 -3
  257. package/vendor/raylib/src/rlgl.h +184 -144
  258. package/vendor/raylib/src/rmodels.c +207 -144
  259. package/vendor/raylib/src/rshapes.c +105 -47
  260. package/vendor/raylib/src/rtext.c +255 -38
  261. package/vendor/raylib/src/rtextures.c +167 -71
  262. package/vendor/raylib/src/shell.html +63 -63
  263. package/vendor/raylib/src/utils.c +49 -3
  264. package/vendor/raylib/src/utils.h +3 -3
  265. package/build/qemu/2.1.1/koffi_darwin_arm64.tar.gz +0 -0
  266. package/build/qemu/2.1.1/koffi_darwin_x64.tar.gz +0 -0
  267. package/build/qemu/2.1.1/koffi_freebsd_arm64.tar.gz +0 -0
  268. package/build/qemu/2.1.1/koffi_freebsd_ia32.tar.gz +0 -0
  269. package/build/qemu/2.1.1/koffi_freebsd_x64.tar.gz +0 -0
  270. package/build/qemu/2.1.1/koffi_linux_arm32hf.tar.gz +0 -0
  271. package/build/qemu/2.1.1/koffi_linux_arm64.tar.gz +0 -0
  272. package/build/qemu/2.1.1/koffi_linux_ia32.tar.gz +0 -0
  273. package/build/qemu/2.1.1/koffi_linux_riscv64hf64.tar.gz +0 -0
  274. package/build/qemu/2.1.1/koffi_linux_x64.tar.gz +0 -0
  275. package/build/qemu/2.1.1/koffi_openbsd_ia32.tar.gz +0 -0
  276. package/build/qemu/2.1.1/koffi_openbsd_x64.tar.gz +0 -0
  277. package/build/qemu/2.1.1/koffi_win32_arm64.tar.gz +0 -0
  278. package/build/qemu/2.1.1/koffi_win32_ia32.tar.gz +0 -0
  279. package/build/qemu/2.1.1/koffi_win32_x64.tar.gz +0 -0
  280. package/vendor/raylib/CONTRIBUTORS.md +0 -63
  281. package/vendor/raylib/SPONSORS.md +0 -68
  282. package/vendor/raylib/examples/core/core_quat_conversion.c +0 -132
  283. package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
  284. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
  285. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +0 -118
  286. package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
  287. package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
  288. package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
  289. package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
  290. package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
  291. package/vendor/raylib/examples/models/rlights.h +0 -183
  292. package/vendor/raylib/examples/others/raudio_standalone.c +0 -152
  293. package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
  294. package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
  295. package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
  296. package/vendor/raylib/examples/physics/physics_demo.c +0 -128
  297. package/vendor/raylib/examples/physics/physics_demo.png +0 -0
  298. package/vendor/raylib/examples/physics/physics_friction.c +0 -142
  299. package/vendor/raylib/examples/physics/physics_friction.png +0 -0
  300. package/vendor/raylib/examples/physics/physics_movement.c +0 -128
  301. package/vendor/raylib/examples/physics/physics_movement.png +0 -0
  302. package/vendor/raylib/examples/physics/physics_restitution.c +0 -129
  303. package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
  304. package/vendor/raylib/examples/physics/physics_shatter.c +0 -111
  305. package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
  306. package/vendor/raylib/parser/raylib_api.json +0 -6668
  307. package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
  308. package/vendor/raylib/projects/VS2019/raylib/resource.h +0 -14
  309. package/vendor/raylib/src/extras/physac.h +0 -1977
  310. package/vendor/raylib/src/extras/rmem.h +0 -751
  311. package/vendor/raylib/src/raudio.h +0 -198
@@ -1,7 +1,7 @@
1
1
  # Setup the project and settings
2
2
  project(raylib C)
3
- set(PROJECT_VERSION 4.0.0)
4
- set(API_VERSION 400)
3
+ set(PROJECT_VERSION 4.2.0)
4
+ set(API_VERSION 420)
5
5
 
6
6
  include(GNUInstallDirs)
7
7
  include(JoinPaths)
@@ -25,7 +25,6 @@ set(raylib_public_headers
25
25
  raylib.h
26
26
  rlgl.h
27
27
  raymath.h
28
- raudio.h
29
28
  )
30
29
 
31
30
  # Sources to be compiled
@@ -41,6 +40,10 @@ set(raylib_sources
41
40
  # <root>/cmake/GlfwImport.cmake handles the details around the inclusion of glfw
42
41
  include(GlfwImport)
43
42
 
43
+ # Sets additional platform options and link libraries for each platform
44
+ # also selects the proper graphics API and version for that platform
45
+ # Produces a variable LIBS_PRIVATE that will be used later
46
+ include(LibraryConfigurations)
44
47
 
45
48
  if (USE_AUDIO)
46
49
  MESSAGE(STATUS "Audio Backend: miniaudio")
@@ -49,10 +52,6 @@ else ()
49
52
  MESSAGE(STATUS "Audio Backend: None (-DUSE_AUDIO=OFF)")
50
53
  endif ()
51
54
 
52
- # Sets additional platform options and link libraries for each platform
53
- # also selects the proper graphics API and version for that platform
54
- # Produces a variable LIBS_PRIVATE that will be used later
55
- include(LibraryConfigurations)
56
55
 
57
56
  add_library(raylib ${raylib_sources} ${raylib_public_headers})
58
57
 
@@ -8,43 +8,45 @@
8
8
  # PLATFORM_DESKTOP: OSX/macOS (arm64, x86_64)
9
9
  # PLATFORM_DESKTOP: FreeBSD, OpenBSD, NetBSD, DragonFly
10
10
  # PLATFORM_ANDROID: Android (arm, i686, arm64, x86_64)
11
- # PLATFORM_RPI: Raspberry Pi (Raspbian)
12
- # PLATFORM_DRM: Linux native mode, including Raspberry Pi 4 with V3D fkms driver
11
+ # PLATFORM_RPI: Raspberry Pi (deprecated - RPI OS Buster only)
12
+ # PLATFORM_DRM: Linux native mode, including Raspberry Pi (RPI OS Bullseye)
13
13
  # PLATFORM_WEB: HTML5 (Chrome, Firefox)
14
14
  #
15
15
  # Many thanks to Milan Nikolic (@gen2brain) for implementing Android platform pipeline.
16
16
  # Many thanks to Emanuele Petriglia for his contribution on GNU/Linux pipeline.
17
17
  #
18
- # Copyright (c) 2014-2019 Ramon Santamaria (@raysan5)
18
+ # Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
19
19
  #
20
- # This software is provided "as-is", without any express or implied warranty.
21
- # In no event will the authors be held liable for any damages arising from
22
- # the use of this software.
20
+ # This software is provided "as-is", without any express or implied warranty. In no event
21
+ # will the authors be held liable for any damages arising from the use of this software.
23
22
  #
24
- # Permission is granted to anyone to use this software for any purpose,
25
- # including commercial applications, and to alter it and redistribute it
26
- # freely, subject to the following restrictions:
23
+ # Permission is granted to anyone to use this software for any purpose, including commercial
24
+ # applications, and to alter it and redistribute it freely, subject to the following restrictions:
27
25
  #
28
- # 1. The origin of this software must not be misrepresented; you must not
29
- # claim that you wrote the original software. If you use this software in a
30
- # product, an acknowledgment in the product documentation would be
31
- # appreciated but is not required.
26
+ # 1. The origin of this software must not be misrepresented; you must not claim that you
27
+ # wrote the original software. If you use this software in a product, an acknowledgment
28
+ # in the product documentation would be appreciated but is not required.
32
29
  #
33
- # 2. Altered source versions must be plainly marked as such, and must not
34
- # be misrepresented as being the original software.
30
+ # 2. Altered source versions must be plainly marked as such, and must not be misrepresented
31
+ # as being the original software.
35
32
  #
36
- # 3. This notice may not be removed or altered from any source distribution.
33
+ # 3. This notice may not be removed or altered from any source distribution.
37
34
  #
38
- #******************************************************************************
35
+ #**************************************************************************************************
39
36
 
40
- # Please read the wiki to know how to compile raylib, because there are different methods.
37
+ # NOTE: Highly recommended to read the raylib Wiki to know how to compile raylib for different platforms
41
38
  # https://github.com/raysan5/raylib/wiki
42
39
 
43
40
  .PHONY: all clean install uninstall
44
41
 
42
+ # Define required environment variables
43
+ #------------------------------------------------------------------------------------------------
44
+ # Define target platform: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
45
+ PLATFORM ?= PLATFORM_DESKTOP
46
+
45
47
  # Define required raylib variables
46
- RAYLIB_VERSION = 4.0.0
47
- RAYLIB_API_VERSION = 400
48
+ RAYLIB_VERSION = 4.2.0
49
+ RAYLIB_API_VERSION = 420
48
50
 
49
51
  # Define raylib source code path
50
52
  RAYLIB_SRC_PATH ?= ../src
@@ -65,9 +67,12 @@ RAYLIB_LIB_NAME ?= raylib
65
67
  # Define resource file for DLL properties
66
68
  RAYLIB_RES_FILE ?= ./raylib.dll.rc.data
67
69
 
68
- # Define raylib platform
69
- # Options: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
70
- PLATFORM ?= PLATFORM_DESKTOP
70
+ # Define external config flags
71
+ # NOTE: It will override config.h flags with the provided ones,
72
+ # if NONE, default config.h flags are used
73
+ RAYLIB_CONFIG_FLAGS ?= NONE
74
+
75
+ # To define additional cflags: Use make CUSTOM_CFLAGS=""
71
76
 
72
77
  # Include raylib modules on compilation
73
78
  # NOTE: Some programs like tools could not require those modules
@@ -76,15 +81,18 @@ RAYLIB_MODULE_MODELS ?= TRUE
76
81
  RAYLIB_MODULE_RAYGUI ?= FALSE
77
82
  RAYLIB_MODULE_PHYSAC ?= FALSE
78
83
 
79
- RAYLIB_MODULE_RAYGUI_PATH ?= $(RAYLIB_SRC_PATH)/extras
80
- RAYLIB_MODULE_PHYSAC_PATH ?= $(RAYLIB_SRC_PATH)/extras
84
+ # NOTE: Additional libraries have been moved to their own repos:
85
+ # raygui: https://github.com/raysan5/raygui
86
+ # physac: https://github.com/raysan5/physac
87
+ RAYLIB_MODULE_RAYGUI_PATH ?= $(RAYLIB_SRC_PATH)/../../raygui/src
88
+ RAYLIB_MODULE_PHYSAC_PATH ?= $(RAYLIB_SRC_PATH)/../../physac/src
81
89
 
82
90
  # Use external GLFW library instead of rglfw module
83
- USE_EXTERNAL_GLFW ?= FALSE
91
+ USE_EXTERNAL_GLFW ?= FALSE
84
92
 
85
- # Use Wayland display server protocol on Linux desktop
86
- # by default it uses X11 windowing system
87
- USE_WAYLAND_DISPLAY ?= FALSE
93
+ # Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
94
+ # NOTE: This variable is only used for PLATFORM_OS: LINUX
95
+ USE_WAYLAND_DISPLAY ?= FALSE
88
96
 
89
97
  # Use cross-compiler for PLATFORM_RPI
90
98
  ifeq ($(PLATFORM),PLATFORM_RPI)
@@ -95,13 +103,13 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
95
103
  endif
96
104
  endif
97
105
 
98
- # Determine if the file has root access (only for installing raylib)
99
- # "whoami" prints the name of the user that calls him (so, if it is the root
100
- # user, "whoami" prints "root").
106
+ # Determine if the file has root access (only required to install raylib)
107
+ # "whoami" prints the name of the user that calls him (so, if it is the root user, "whoami" prints "root")
101
108
  ROOT = $(shell whoami)
102
109
 
103
110
  # By default we suppose we are working on Windows
104
111
  HOST_PLATFORM_OS ?= WINDOWS
112
+ PLATFORM_OS ?= WINDOWS
105
113
 
106
114
  # Determine PLATFORM_OS in case PLATFORM_DESKTOP selected
107
115
  ifeq ($(PLATFORM),PLATFORM_DESKTOP)
@@ -109,6 +117,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
109
117
  # ifeq ($(UNAME),Msys) -> Windows
110
118
  ifeq ($(OS),Windows_NT)
111
119
  PLATFORM_OS = WINDOWS
120
+ ifndef PLATFORM_SHELL
121
+ PLATFORM_SHELL = cmd
122
+ endif
112
123
  else
113
124
  UNAMEOS = $(shell uname)
114
125
  ifeq ($(UNAMEOS),Linux)
@@ -129,6 +140,9 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
129
140
  ifeq ($(UNAMEOS),Darwin)
130
141
  PLATFORM_OS = OSX
131
142
  endif
143
+ ifndef PLATFORM_SHELL
144
+ PLATFORM_SHELL = sh
145
+ endif
132
146
  endif
133
147
  endif
134
148
  ifeq ($(PLATFORM),PLATFORM_RPI)
@@ -136,21 +150,33 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
136
150
  ifeq ($(UNAMEOS),Linux)
137
151
  PLATFORM_OS = LINUX
138
152
  endif
153
+ ifndef PLATFORM_SHELL
154
+ PLATFORM_SHELL = sh
155
+ endif
139
156
  endif
140
157
  ifeq ($(PLATFORM),PLATFORM_DRM)
141
158
  UNAMEOS = $(shell uname)
142
159
  ifeq ($(UNAMEOS),Linux)
143
160
  PLATFORM_OS = LINUX
144
161
  endif
162
+ ifndef PLATFORM_SHELL
163
+ PLATFORM_SHELL = sh
164
+ endif
145
165
  endif
146
-
147
- # RAYLIB_SRC_PATH adjustment for different platforms.
148
- # If using GNU make, we can get the full path to the top of the tree. Windows? BSD?
149
- # Required for ldconfig or other tools that do not perform path expansion.
150
- ifeq ($(PLATFORM),PLATFORM_DESKTOP)
151
- ifeq ($(PLATFORM_OS),LINUX)
152
- RAYLIB_PREFIX ?= ..
153
- RAYLIB_SRC_PATH = $(realpath $(RAYLIB_PREFIX))
166
+ ifeq ($(PLATFORM),PLATFORM_WEB)
167
+ ifeq ($(OS),Windows_NT)
168
+ PLATFORM_OS = WINDOWS
169
+ ifndef PLATFORM_SHELL
170
+ PLATFORM_SHELL = cmd
171
+ endif
172
+ else
173
+ UNAMEOS = $(shell uname)
174
+ ifeq ($(UNAMEOS),Linux)
175
+ PLATFORM_OS = LINUX
176
+ endif
177
+ ifndef PLATFORM_SHELL
178
+ PLATFORM_SHELL = sh
179
+ endif
154
180
  endif
155
181
  endif
156
182
 
@@ -223,7 +249,8 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
223
249
  GRAPHICS = GRAPHICS_API_OPENGL_ES2
224
250
  endif
225
251
 
226
- # Define default C compiler and archiver to pack library
252
+ # Define default C compiler and archiver to pack library: CC, AR
253
+ #------------------------------------------------------------------------------------------------
227
254
  CC = gcc
228
255
  AR = ar
229
256
 
@@ -259,24 +286,37 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
259
286
  ifeq ($(ANDROID_ARCH),arm64)
260
287
  CC = $(ANDROID_TOOLCHAIN)/bin/$(ANDROID_COMPILER_ARCH)-linux-android$(ANDROID_API_VERSION)-clang
261
288
  endif
289
+ ifeq ($(ANDROID_ARCH),x86)
290
+ CC = $(ANDROID_TOOLCHAIN)/bin/$(ANDROID_COMPILER_ARCH)-linux-android$(ANDROID_API_VERSION)-clang
291
+ endif
292
+ ifeq ($(ANDROID_ARCH),x86_64)
293
+ CC = $(ANDROID_TOOLCHAIN)/bin/$(ANDROID_COMPILER_ARCH)-linux-android$(ANDROID_API_VERSION)-clang
294
+ endif
262
295
  # It seems from Android NDK r22 onwards we need to use llvm-ar
263
296
  AR = $(ANDROID_TOOLCHAIN)/bin/llvm-ar
264
297
  endif
265
298
 
266
- # Define compiler flags:
299
+ # Define compiler flags: CFLAGS
300
+ #------------------------------------------------------------------------------------------------
267
301
  # -O1 defines optimization level
268
302
  # -g include debug information on compilation
269
- # -s strip unnecessary data from build
303
+ # -s strip unnecessary data from build --> linker
270
304
  # -Wall turns on most, but not all, compiler warnings
271
305
  # -std=c99 defines C language mode (standard C from 1999 revision)
272
306
  # -std=gnu99 defines C language mode (GNU C from 1999 revision)
273
307
  # -Wno-missing-braces ignore invalid warning (GCC bug 53119)
308
+ # -Wno-unused-value ignore unused return values of some functions (i.e. fread())
274
309
  # -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
275
310
  # -Werror=pointer-arith catch unportable code that does direct arithmetic on void pointers
276
311
  # -fno-strict-aliasing jar_xm.h does shady stuff (breaks strict aliasing)
277
- CFLAGS += -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing
312
+ CFLAGS = -Wall -D_DEFAULT_SOURCE -D$(PLATFORM) -D$(GRAPHICS) -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing $(CUSTOM_CFLAGS)
313
+
314
+ ifneq ($(RAYLIB_CONFIG_FLAGS), NONE)
315
+ CFLAGS += -DEXTERNAL_CONFIG_FLAGS $(RAYLIB_CONFIG_FLAGS)
316
+ endif
278
317
 
279
318
  ifeq ($(PLATFORM), PLATFORM_WEB)
319
+ # NOTE: When using multi-threading in the user code, it requires -pthread enabled
280
320
  CFLAGS += -std=gnu99
281
321
  else
282
322
  CFLAGS += -std=c99
@@ -287,7 +327,7 @@ ifeq ($(PLATFORM_OS), LINUX)
287
327
  endif
288
328
 
289
329
  ifeq ($(RAYLIB_BUILD_MODE),DEBUG)
290
- CFLAGS += -g
330
+ CFLAGS += -g -D_DEBUG
291
331
  endif
292
332
 
293
333
  ifeq ($(RAYLIB_BUILD_MODE),RELEASE)
@@ -295,7 +335,7 @@ ifeq ($(RAYLIB_BUILD_MODE),RELEASE)
295
335
  CFLAGS += -Os
296
336
  endif
297
337
  ifeq ($(PLATFORM),PLATFORM_DESKTOP)
298
- CFLAGS += -s -O1
338
+ CFLAGS += -O1
299
339
  endif
300
340
  ifeq ($(PLATFORM),PLATFORM_ANDROID)
301
341
  CFLAGS += -O2
@@ -361,43 +401,32 @@ ifeq ($(PLATFORM),PLATFORM_DRM)
361
401
  # which contains a conflicting type Font
362
402
  CFLAGS += -DEGL_NO_X11
363
403
  endif
364
-
365
404
  # Use Wayland display on Linux desktop
366
405
  ifeq ($(PLATFORM),PLATFORM_DESKTOP)
367
406
  ifeq ($(PLATFORM_OS), LINUX)
368
407
  ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
369
408
  CFLAGS += -D_GLFW_WAYLAND
370
- else
371
- LDLIBS = -lX11
372
409
  endif
373
410
  endif
374
411
  endif
375
412
 
376
- # Define include paths for required headers
413
+ # Define include paths for required headers: INCLUDE_PATHS
377
414
  # NOTE: Several external required libraries (stb and others)
415
+ #------------------------------------------------------------------------------------------------
378
416
  INCLUDE_PATHS = -I. -Iexternal/glfw/include -Iexternal/glfw/deps/mingw
379
417
 
418
+ # Define additional directories containing required header files
380
419
  ifeq ($(PLATFORM),PLATFORM_DESKTOP)
381
420
  ifeq ($(PLATFORM_OS),BSD)
382
421
  INCLUDE_PATHS += -I/usr/local/include
383
- LDFLAGS += -L. -Lsrc -L/usr/local/lib -L$(RAYLIB_RELEASE_PATH)
384
- endif
385
- ifeq ($(USE_EXTERNAL_GLFW),TRUE)
386
- # Check the version name. If GLFW3 was built manually, it may have produced
387
- # a static library known as libglfw3.a. In that case, the name should be -lglfw3
388
- LDFLAGS += -lglfw
389
422
  endif
390
423
  endif
391
-
392
- # Define additional directories containing required header files
393
424
  ifeq ($(PLATFORM),PLATFORM_RPI)
394
- # RPI required libraries
395
425
  INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include
396
426
  INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vmcs_host/linux
397
427
  INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vcos/pthreads
398
428
  endif
399
429
  ifeq ($(PLATFORM),PLATFORM_DRM)
400
- # DRM required libraries
401
430
  INCLUDE_PATHS += -I/usr/include/libdrm
402
431
  endif
403
432
  ifeq ($(PLATFORM),PLATFORM_ANDROID)
@@ -421,27 +450,91 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
421
450
  endif
422
451
  endif
423
452
 
424
- # Define linker options
453
+ # Define library paths containing required libs: LDFLAGS
454
+ # NOTE: This is only required for dynamic library generation
455
+ #------------------------------------------------------------------------------------------------
456
+ LDFLAGS = $(CUSTOM_LDFLAGS) -L. -L$(RAYLIB_RELEASE_PATH)
457
+
458
+ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
459
+ ifeq ($(PLATFORM_OS),WINDOWS)
460
+ ifneq ($(CC), tcc)
461
+ LDFLAGS += -Wl,--out-implib,$(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME)dll.a
462
+ endif
463
+ endif
464
+ ifeq ($(PLATFORM_OS),OSX)
465
+ LDFLAGS += -compatibility_version $(RAYLIB_API_VERSION) -current_version $(RAYLIB_VERSION)
466
+ endif
467
+ ifeq ($(PLATFORM_OS),LINUX)
468
+ LDFLAGS += -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION)
469
+ endif
470
+ ifeq ($(PLATFORM_OS),BSD)
471
+ LDFLAGS += -Wl,-soname,lib$(RAYLIB_LIB_NAME).$(RAYLIB_API_VERSION).so -Lsrc -L/usr/local/lib
472
+ endif
473
+ endif
474
+ ifeq ($(PLATFORM),PLATFORM_RPI)
475
+ LDFLAGS += -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION) -L$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/lib
476
+ endif
477
+ ifeq ($(PLATFORM),PLATFORM_DRM)
478
+ LDFLAGS += -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION)
479
+ endif
425
480
  ifeq ($(PLATFORM),PLATFORM_ANDROID)
426
481
  LDFLAGS += -Wl,-soname,libraylib.$(API_VERSION).so -Wl,--exclude-libs,libatomic.a
427
482
  LDFLAGS += -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings
428
483
  # Force linking of library module to define symbol
429
484
  LDFLAGS += -u ANativeActivity_onCreate
430
485
  # Library paths containing required libs
431
- LDFLAGS += -L. -Lsrc -L$(RAYLIB_RELEASE_PATH)
486
+ LDFLAGS += -Lsrc
432
487
  # Avoid unresolved symbol pointing to external main()
433
488
  LDFLAGS += -Wl,-undefined,dynamic_lookup
434
-
435
- LDLIBS += -llog -landroid -lEGL -lGLESv2 -lOpenSLES -lc -lm
436
489
  endif
437
490
 
438
- # Define all object files required with a wildcard
439
- # The wildcard takes all files that finish with ".c",
440
- # and replaces extentions with ".o", that are the object files
441
- # NOTE: Some objects depend on the PLATFORM to be added or not!
442
- # OBJS = $(patsubst %.c, %.o, $(wildcard *.c))
491
+ # Define libraries required on linking: LDLIBS
492
+ # NOTE: This is only required for dynamic library generation
493
+ #------------------------------------------------------------------------------------------------
494
+ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
495
+ ifeq ($(PLATFORM_OS),WINDOWS)
496
+ ifeq ($(CC), tcc)
497
+ LDLIBS = -lopengl32 -lgdi32 -lwinmm -lshell32
498
+ else
499
+ LDLIBS = -static-libgcc -lopengl32 -lgdi32 -lwinmm
500
+ endif
501
+ endif
502
+ ifeq ($(PLATFORM_OS),LINUX)
503
+ LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt
504
+ ifeq ($(USE_WAYLAND_DISPLAY),FALSE)
505
+ LDLIBS += -lX11
506
+ endif
507
+ endif
508
+ ifeq ($(PLATFORM_OS),OSX)
509
+ LDLIBS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
510
+ endif
511
+ ifeq ($(PLATFORM_OS),BSD)
512
+ LDLIBS = -lGL -lpthread
513
+ endif
514
+ ifeq ($(USE_EXTERNAL_GLFW),TRUE)
515
+ # Check the version name. If GLFW3 was built manually, it may have produced
516
+ # a static library known as libglfw3.a. In that case, the name should be -lglfw3
517
+ LDLIBS = -lglfw
518
+ endif
519
+ endif
520
+ ifeq ($(PLATFORM),PLATFORM_RPI)
521
+ LDLIBS = -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl
522
+ ifeq ($(RAYLIB_MODULE_AUDIO),TRUE)
523
+ LDLIBS += -latomic
524
+ endif
525
+ endif
526
+ ifeq ($(PLATFORM),PLATFORM_DRM)
527
+ LDLIBS = -lGLESv2 -lEGL -ldrm -lgbm -lpthread -lrt -lm -ldl
528
+ ifeq ($(RAYLIB_MODULE_AUDIO),TRUE)
529
+ LDLIBS += -latomic
530
+ endif
531
+ endif
532
+ ifeq ($(PLATFORM),PLATFORM_ANDROID)
533
+ LDLIBS = -llog -landroid -lEGL -lGLESv2 -lOpenSLES -lc -lm
534
+ endif
443
535
 
444
- # Define object required on compilation
536
+ # Define source code object files required
537
+ #------------------------------------------------------------------------------------------------
445
538
  OBJS = rcore.o \
446
539
  rshapes.o \
447
540
  rtextures.o \
@@ -470,6 +563,8 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
470
563
  OBJS += android_native_app_glue.o
471
564
  endif
472
565
 
566
+ # Define processes to execute
567
+ #------------------------------------------------------------------------------------------------
473
568
  # Default target entry
474
569
  all: raylib
475
570
 
@@ -486,19 +581,19 @@ else
486
581
  ifeq ($(PLATFORM),PLATFORM_DESKTOP)
487
582
  ifeq ($(PLATFORM_OS),WINDOWS)
488
583
  # NOTE: Linking with provided resource file
489
- $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/$(RAYLIB_LIB_NAME).dll $(OBJS) $(RAYLIB_RES_FILE) $(LDFLAGS) -static-libgcc -lopengl32 -lgdi32 -lwinmm -Wl,--out-implib,$(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME)dll.a
584
+ $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/$(RAYLIB_LIB_NAME).dll $(OBJS) $(RAYLIB_RES_FILE) $(LDFLAGS) $(LDLIBS)
490
585
  @echo "raylib dynamic library ($(RAYLIB_LIB_NAME).dll) and import library (lib$(RAYLIB_LIB_NAME)dll.a) generated!"
491
586
  endif
492
587
  ifeq ($(PLATFORM_OS),LINUX)
493
588
  # Compile raylib shared library version $(RAYLIB_VERSION).
494
589
  # WARNING: you should type "make clean" before doing this target
495
- $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) $(OBJS) $(LDFLAGS) -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION) -lGL -lc -lm -lpthread -ldl -lrt $(LDLIBS)
590
+ $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) $(OBJS) $(LDFLAGS) $(LDLIBS)
496
591
  @echo "raylib shared library generated (lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION)) in $(RAYLIB_RELEASE_PATH)!"
497
592
  cd $(RAYLIB_RELEASE_PATH) && ln -fsv lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION)
498
593
  cd $(RAYLIB_RELEASE_PATH) && ln -fsv lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION) lib$(RAYLIB_LIB_NAME).so
499
594
  endif
500
595
  ifeq ($(PLATFORM_OS),OSX)
501
- $(CC) -dynamiclib -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).dylib $(OBJS) $(LDFLAGS) -compatibility_version $(RAYLIB_API_VERSION) -current_version $(RAYLIB_VERSION) -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
596
+ $(CC) -dynamiclib -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).dylib $(OBJS) $(LDFLAGS) $(LDLIBS)
502
597
  install_name_tool -id "@rpath/lib$(RAYLIB_LIB_NAME).$(RAYLIB_API_VERSION).dylib" $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).dylib
503
598
  @echo "raylib shared library generated (lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).dylib)!"
504
599
  cd $(RAYLIB_RELEASE_PATH) && ln -fs lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).dylib lib$(RAYLIB_LIB_NAME).$(RAYLIB_API_VERSION).dylib
@@ -506,7 +601,7 @@ else
506
601
  endif
507
602
  ifeq ($(PLATFORM_OS),BSD)
508
603
  # WARNING: you should type "gmake clean" before doing this target
509
- $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).so $(OBJS) $(LDFLAGS) -Wl,-soname,lib$(RAYLIB_LIB_NAME).$(RAYLIB_API_VERSION).so -lGL -lpthread
604
+ $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).so $(OBJS) $(LDFLAGS) $(LDLIBS)
510
605
  @echo "raylib shared library generated (lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).so)!"
511
606
  cd $(RAYLIB_RELEASE_PATH) && ln -fs lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).so lib$(RAYLIB_LIB_NAME).$(RAYLIB_API_VERSION).so
512
607
  cd $(RAYLIB_RELEASE_PATH) && ln -fs lib$(RAYLIB_LIB_NAME).$(RAYLIB_VERSION).so lib$(RAYLIB_LIB_NAME).so
@@ -515,7 +610,7 @@ else
515
610
  ifeq ($(PLATFORM),PLATFORM_RPI)
516
611
  # Compile raylib shared library version $(RAYLIB_VERSION).
517
612
  # WARNING: you should type "make clean" before doing this target
518
- $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) $(OBJS) $(LDFLAGS) -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION) -L/opt/vc/lib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl
613
+ $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) $(OBJS) $(LDFLAGS) $(LDLIBS)
519
614
  @echo "raylib shared library generated (lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION)) in $(RAYLIB_RELEASE_PATH)!"
520
615
  cd $(RAYLIB_RELEASE_PATH) && ln -fsv lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION)
521
616
  cd $(RAYLIB_RELEASE_PATH) && ln -fsv lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION) lib$(RAYLIB_LIB_NAME).so
@@ -523,7 +618,7 @@ else
523
618
  ifeq ($(PLATFORM),PLATFORM_DRM)
524
619
  # Compile raylib shared library version $(RAYLIB_VERSION).
525
620
  # WARNING: you should type "make clean" before doing this target
526
- $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) $(OBJS) $(LDFLAGS) -Wl,-soname,lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION) -lGLESv2 -lEGL -ldrm -lgbm -lpthread -lrt -lm -ldl
621
+ $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) $(OBJS) $(LDFLAGS) $(LDLIBS)
527
622
  @echo "raylib shared library generated (lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION)) in $(RAYLIB_RELEASE_PATH)!"
528
623
  cd $(RAYLIB_RELEASE_PATH) && ln -fsv lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_VERSION) lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION)
529
624
  cd $(RAYLIB_RELEASE_PATH) && ln -fsv lib$(RAYLIB_LIB_NAME).so.$(RAYLIB_API_VERSION) lib$(RAYLIB_LIB_NAME).so
@@ -549,52 +644,61 @@ endif
549
644
 
550
645
  # Compile core module
551
646
  rcore.o : rcore.c raylib.h rlgl.h utils.h raymath.h rcamera.h rgestures.h
552
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS)
647
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
553
648
 
554
649
  # Compile rglfw module
555
650
  rglfw.o : rglfw.c
556
- $(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS)
651
+ $(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS)
557
652
 
558
653
  # Compile shapes module
559
654
  rshapes.o : rshapes.c raylib.h rlgl.h
560
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS)
655
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
561
656
 
562
657
  # Compile textures module
563
658
  rtextures.o : rtextures.c raylib.h rlgl.h utils.h
564
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS)
659
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
565
660
 
566
661
  # Compile text module
567
662
  rtext.o : rtext.c raylib.h utils.h
568
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS)
663
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
569
664
 
570
665
  # Compile utils module
571
666
  utils.o : utils.c utils.h
572
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM)
667
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
573
668
 
574
669
  # Compile models module
575
670
  rmodels.o : rmodels.c raylib.h rlgl.h raymath.h
576
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -D$(GRAPHICS)
671
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
577
672
 
578
673
  # Compile audio module
579
674
  raudio.o : raudio.c raylib.h
580
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM)
675
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
581
676
 
582
677
  # Compile raygui module
583
678
  # NOTE: raygui header should be distributed with raylib.h
584
679
  raygui.o : raygui.c
585
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -DRAYGUI_IMPLEMENTATION
680
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
586
681
  raygui.c:
587
- echo #define RAYGUI_IMPLEMENTATION > raygui.c
588
- echo #include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h" >> raygui.c
682
+ ifeq ($(PLATFORM_SHELL), cmd)
683
+ @echo #define RAYGUI_IMPLEMENTATION > raygui.c
684
+ @echo #include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h" >> raygui.c
685
+ else
686
+ @echo "#define RAYGUI_IMPLEMENTATION" > raygui.c
687
+ @echo "#include \"$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h\"" >> raygui.c
688
+ endif
589
689
 
590
690
  # Compile physac module
591
691
  # NOTE: physac header should be distributed with raylib.h
592
692
  physac.o : physac.c
593
- $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -DPHYSAC_IMPLEMENTATION
693
+ $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
594
694
  physac.c:
695
+ ifeq ($(PLATFORM_SHELL), cmd)
595
696
  @echo #define PHYSAC_IMPLEMENTATION > physac.c
596
697
  @echo #include "$(RAYLIB_MODULE_PHYSAC_PATH)/physac.h" >> physac.c
597
-
698
+ else
699
+ @echo "#define PHYSAC_IMPLEMENTATION" > physac.c
700
+ @echo "#include \"$(RAYLIB_MODULE_PHYSAC_PATH)/physac.h\"" >> physac.c
701
+ endif
598
702
  # Compile android_native_app_glue module
599
703
  android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c
600
704
  $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS)
@@ -610,7 +714,6 @@ android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c
610
714
  # for compilation and enable runtime linking with -rpath, LD_LIBRARY_PATH, or ldconfig.
611
715
  # HINT: Add -L$(RAYLIB_INSTALL_PATH) -I$(RAYLIB_H_INSTALL_PATH) to your own makefiles.
612
716
  # See below and ../examples/Makefile for more information.
613
- # TODO: Add other platforms. Remove sudo requirement, i.e. add USER mode.
614
717
 
615
718
  # RAYLIB_INSTALL_PATH should be the desired full path to libraylib. No relative paths.
616
719
  DESTDIR ?= /usr/local
@@ -642,7 +745,6 @@ ifeq ($(ROOT),root)
642
745
  cp --update raylib.h $(RAYLIB_H_INSTALL_PATH)/raylib.h
643
746
  cp --update raymath.h $(RAYLIB_H_INSTALL_PATH)/raymath.h
644
747
  cp --update rlgl.h $(RAYLIB_H_INSTALL_PATH)/rlgl.h
645
- cp --update extras/physac.h $(RAYLIB_H_INSTALL_PATH)/physac.h
646
748
  @echo "raylib development files installed/updated!"
647
749
  else
648
750
  @echo "This function currently works on GNU/Linux systems. Add yours today (^;"
@@ -670,7 +772,6 @@ ifeq ($(ROOT),root)
670
772
  rm --force --interactive --verbose $(RAYLIB_H_INSTALL_PATH)/raylib.h
671
773
  rm --force --interactive --verbose $(RAYLIB_H_INSTALL_PATH)/raymath.h
672
774
  rm --force --interactive --verbose $(RAYLIB_H_INSTALL_PATH)/rlgl.h
673
- rm --force --interactive --verbose $(RAYLIB_H_INSTALL_PATH)/physac.h
674
775
  @echo "raylib development files removed!"
675
776
  else
676
777
  @echo "This function currently works on GNU/Linux systems. Add yours today (^;"
@@ -679,18 +780,23 @@ else
679
780
  @echo "Error: Root permissions needed for uninstallation. Try sudo make uninstall"
680
781
  endif
681
782
 
783
+ .PHONY: clean_shell_cmd clean_shell_sh
784
+
682
785
  # Clean everything
683
- clean:
684
- ifeq ($(PLATFORM_OS),WINDOWS)
685
- del *.o /s
686
- cd $(RAYLIB_RELEASE_PATH)
687
- del lib$(RAYLIB_LIB_NAME).a /s
688
- del lib$(RAYLIB_LIB_NAME)dll.a /s
689
- del $(RAYLIB_LIB_NAME).dll /s
690
- else
786
+ clean: clean_shell_$(PLATFORM_SHELL)
787
+ @echo "removed all generated files!"
788
+
789
+ clean_shell_sh:
691
790
  rm -fv *.o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).a $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).bc $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).so*
692
- endif
693
791
  ifeq ($(PLATFORM),PLATFORM_ANDROID)
694
- rm -rf $(ANDROID_TOOLCHAIN) $(NATIVE_APP_GLUE)/android_native_app_glue.o
792
+ rm -fv $(NATIVE_APP_GLUE)/android_native_app_glue.o
695
793
  endif
696
- @echo "removed all generated files!"
794
+
795
+ # Set specific target variable
796
+ clean_shell_cmd: SHELL=cmd
797
+ clean_shell_cmd:
798
+ del *.o /s
799
+ cd $(RAYLIB_RELEASE_PATH) & \
800
+ del lib$(RAYLIB_LIB_NAME).a /s & \
801
+ del lib$(RAYLIB_LIB_NAME)dll.a /s & \
802
+ del $(RAYLIB_LIB_NAME).dll /s