Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

1158 wiersze
54 KiB

11 miesięcy temu
1 miesiąc temu
1 miesiąc temu
1 miesiąc temu
1 miesiąc temu
2 lat temu
2 lat temu
  1. #**************************************************************************************************
  2. #
  3. # raylib makefile for Desktop platforms, Raspberry Pi, Android and HTML5
  4. #
  5. # Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
  6. #
  7. # This software is provided "as-is", without any express or implied warranty. In no event
  8. # will the authors be held liable for any damages arising from the use of this software.
  9. #
  10. # Permission is granted to anyone to use this software for any purpose, including commercial
  11. # applications, and to alter it and redistribute it freely, subject to the following restrictions:
  12. #
  13. # 1. The origin of this software must not be misrepresented; you must not claim that you
  14. # wrote the original software. If you use this software in a product, an acknowledgment
  15. # in the product documentation would be appreciated but is not required.
  16. #
  17. # 2. Altered source versions must be plainly marked as such, and must not be misrepresented
  18. # as being the original software.
  19. #
  20. # 3. This notice may not be removed or altered from any source distribution.
  21. #
  22. #**************************************************************************************************
  23. .PHONY: all clean
  24. # Define required environment variables
  25. #------------------------------------------------------------------------------------------------
  26. # Define target platform: PLATFORM_DESKTOP, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
  27. PLATFORM ?= PLATFORM_WEB
  28. # Define required raylib variables
  29. PROJECT_NAME ?= raylib_examples
  30. RAYLIB_VERSION ?= 5.0.0
  31. RAYLIB_PATH ?= ..
  32. # Locations of raylib.h and libraylib.a/libraylib.so
  33. # NOTE: Those variables are only used for PLATFORM_OS: LINUX, BSD
  34. DESTDIR ?= /usr/local
  35. RAYLIB_INCLUDE_PATH ?= $(DESTDIR)/include
  36. RAYLIB_LIB_PATH ?= $(DESTDIR)/lib
  37. # Library type compilation: STATIC (.a) or SHARED (.so/.dll)
  38. RAYLIB_LIBTYPE ?= STATIC
  39. # Build mode for project: DEBUG or RELEASE
  40. BUILD_MODE ?= RELEASE
  41. # Use external GLFW library instead of rglfw module
  42. USE_EXTERNAL_GLFW ?= FALSE
  43. # Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
  44. # NOTE: This variable is only used for PLATFORM_OS: LINUX
  45. USE_WAYLAND_DISPLAY ?= FALSE
  46. # Use WebGL2 backend (OpenGL 3.0)
  47. # WARNING: Requires raylib compiled with GRAPHICS_API_OPENGL_ES3
  48. USE_WEBGL2 ?= FALSE
  49. # Determine PLATFORM_OS in case PLATFORM_DESKTOP or PLATFORM_WEB selected
  50. ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
  51. # No uname.exe on MinGW!, but OS=Windows_NT on Windows!
  52. # ifeq ($(UNAME),Msys) -> Windows
  53. ifeq ($(OS),Windows_NT)
  54. PLATFORM_OS = WINDOWS
  55. else
  56. UNAMEOS = $(shell uname)
  57. ifeq ($(UNAMEOS),Linux)
  58. PLATFORM_OS = LINUX
  59. endif
  60. ifeq ($(UNAMEOS),FreeBSD)
  61. PLATFORM_OS = BSD
  62. endif
  63. ifeq ($(UNAMEOS),OpenBSD)
  64. PLATFORM_OS = BSD
  65. endif
  66. ifeq ($(UNAMEOS),NetBSD)
  67. PLATFORM_OS = BSD
  68. endif
  69. ifeq ($(UNAMEOS),DragonFly)
  70. PLATFORM_OS = BSD
  71. endif
  72. ifeq ($(UNAMEOS),Darwin)
  73. PLATFORM_OS = OSX
  74. endif
  75. endif
  76. endif
  77. ifeq ($(PLATFORM),PLATFORM_DRM)
  78. UNAMEOS = $(shell uname)
  79. ifeq ($(UNAMEOS),Linux)
  80. PLATFORM_OS = LINUX
  81. endif
  82. endif
  83. # RAYLIB_PATH adjustment for LINUX platform
  84. # TODO: Do we really need this?
  85. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  86. ifeq ($(PLATFORM_OS),LINUX)
  87. RAYLIB_PREFIX ?= ..
  88. RAYLIB_PATH = $(realpath $(RAYLIB_PREFIX))
  89. endif
  90. endif
  91. # Default path for raylib on Raspberry Pi
  92. ifeq ($(PLATFORM),PLATFORM_DRM)
  93. RAYLIB_PATH ?= /home/pi/raylib
  94. endif
  95. # Define raylib release directory for compiled library
  96. RAYLIB_RELEASE_PATH ?= $(RAYLIB_PATH)/src
  97. ifeq ($(PLATFORM),PLATFORM_WEB)
  98. ifeq ($(PLATFORM_OS),WINDOWS)
  99. # Emscripten required variables
  100. EMSDK_PATH ?= C:/emsdk
  101. EMSCRIPTEN_PATH ?= $(EMSDK_PATH)/upstream/emscripten
  102. CLANG_PATH = $(EMSDK_PATH)/upstream/bin
  103. PYTHON_PATH = $(EMSDK_PATH)/python/3.9.2-nuget_64bit
  104. NODE_PATH = $(EMSDK_PATH)/node/20.18.0_64bit/bin
  105. export PATH = $(EMSDK_PATH);$(EMSCRIPTEN_PATH);$(CLANG_PATH);$(NODE_PATH);$(PYTHON_PATH):$$(PATH)
  106. endif
  107. endif
  108. # Define default C compiler: CC
  109. #------------------------------------------------------------------------------------------------
  110. CC = gcc
  111. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  112. ifeq ($(PLATFORM_OS),OSX)
  113. # OSX default compiler
  114. CC = clang
  115. endif
  116. ifeq ($(PLATFORM_OS),BSD)
  117. # FreeBSD, OpenBSD, NetBSD, DragonFly default compiler
  118. CC = clang
  119. endif
  120. endif
  121. ifeq ($(PLATFORM),PLATFORM_WEB)
  122. # HTML5 emscripten compiler
  123. # WARNING: To compile to HTML5, code must be redesigned
  124. # to use emscripten.h and emscripten_set_main_loop()
  125. CC = emcc
  126. endif
  127. # Define default make program: MAKE
  128. #------------------------------------------------------------------------------------------------
  129. MAKE ?= make
  130. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  131. ifeq ($(PLATFORM_OS),WINDOWS)
  132. MAKE = mingw32-make
  133. endif
  134. endif
  135. ifeq ($(PLATFORM),PLATFORM_ANDROID)
  136. MAKE = mingw32-make
  137. endif
  138. ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
  139. ifeq ($(OS),Windows_NT)
  140. MAKE = mingw32-make
  141. else
  142. EMMAKE != type emmake
  143. ifneq (, $(EMMAKE))
  144. MAKE = emmake make
  145. else
  146. MAKE = mingw32-make
  147. endif
  148. endif
  149. endif
  150. # Define compiler flags: CFLAGS
  151. #------------------------------------------------------------------------------------------------
  152. # -O1 defines optimization level
  153. # -g include debug information on compilation
  154. # -s strip unnecessary data from build
  155. # -Wall turns on most, but not all, compiler warnings
  156. # -std=c99 defines C language mode (standard C from 1999 revision)
  157. # -std=gnu99 defines C language mode (GNU C from 1999 revision)
  158. # -Wno-missing-braces ignore invalid warning (GCC bug 53119)
  159. # -Wno-unused-value ignore unused return values of some functions (i.e. fread())
  160. # -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
  161. CFLAGS = -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result
  162. ifeq ($(BUILD_MODE),DEBUG)
  163. CFLAGS += -g -D_DEBUG
  164. ifeq ($(PLATFORM),PLATFORM_WEB)
  165. CFLAGS += -sASSERTIONS=1 --profiling
  166. endif
  167. else
  168. ifeq ($(PLATFORM),PLATFORM_WEB)
  169. ifeq ($(BUILD_WEB_ASYNCIFY),TRUE)
  170. CFLAGS += -O3
  171. else
  172. CFLAGS += -Os
  173. endif
  174. else
  175. CFLAGS += -s -O2
  176. endif
  177. endif
  178. # Additional flags for compiler (if desired)
  179. # -Wextra enables some extra warning flags that are not enabled by -Wall
  180. # -Wmissing-prototypes warn if a global function is defined without a previous prototype declaration
  181. # -Wstrict-prototypes warn if a function is declared or defined without specifying the argument types
  182. # -Werror=implicit-function-declaration catch function calls without prior declaration
  183. #CFLAGS += -Wextra -Wmissing-prototypes -Wstrict-prototypes
  184. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  185. ifeq ($(PLATFORM_OS),LINUX)
  186. ifeq ($(RAYLIB_LIBTYPE),STATIC)
  187. CFLAGS += -D_DEFAULT_SOURCE
  188. endif
  189. ifeq ($(RAYLIB_LIBTYPE),SHARED)
  190. # Explicitly enable runtime link to libraylib.so
  191. CFLAGS += -Wl,-rpath,$(RAYLIB_RELEASE_PATH)
  192. endif
  193. endif
  194. endif
  195. ifeq ($(PLATFORM),PLATFORM_DRM)
  196. CFLAGS += -std=gnu99 -DEGL_NO_X11
  197. endif
  198. # Define include paths for required headers: INCLUDE_PATHS
  199. # NOTE: Some external/extras libraries could be required (stb, easings...)
  200. #------------------------------------------------------------------------------------------------
  201. INCLUDE_PATHS = -I. -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external
  202. # Define additional directories containing required header files
  203. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  204. ifeq ($(PLATFORM_OS),BSD)
  205. INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
  206. endif
  207. ifeq ($(PLATFORM_OS),LINUX)
  208. INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
  209. endif
  210. endif
  211. ifeq ($(PLATFORM),PLATFORM_DRM)
  212. INCLUDE_PATHS += -I/usr/include/libdrm
  213. endif
  214. # Define library paths containing required libs: LDFLAGS
  215. #------------------------------------------------------------------------------------------------
  216. LDFLAGS = -L. -L$(RAYLIB_RELEASE_PATH) -L$(RAYLIB_PATH)/src
  217. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  218. ifeq ($(PLATFORM_OS),WINDOWS)
  219. # NOTE: The resource .rc file contains windows executable icon and properties
  220. LDFLAGS += $(RAYLIB_PATH)/src/raylib.rc.data
  221. # -Wl,--subsystem,windows hides the console window
  222. ifeq ($(BUILD_MODE), RELEASE)
  223. LDFLAGS += -Wl,--subsystem,windows
  224. endif
  225. endif
  226. ifeq ($(PLATFORM_OS),LINUX)
  227. LDFLAGS += -L$(RAYLIB_LIB_PATH)
  228. endif
  229. ifeq ($(PLATFORM_OS),BSD)
  230. LDFLAGS += -Lsrc -L$(RAYLIB_LIB_PATH)
  231. endif
  232. endif
  233. ifeq ($(PLATFORM),PLATFORM_WEB)
  234. # -Os # size optimization
  235. # -O2 # optimization level 2, if used, also set --memory-init-file 0
  236. # -sUSE_GLFW=3 # Use glfw3 library (context/input management)
  237. # -sALLOW_MEMORY_GROWTH=1 # to allow memory resizing -> WARNING: Audio buffers could FAIL!
  238. # -sTOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) (67108864 = 64MB)
  239. # -sUSE_PTHREADS=1 # multithreading support
  240. # -sWASM=0 # disable Web Assembly, emitted by default
  241. # -sASYNCIFY # lets synchronous C/C++ code interact with asynchronous JS
  242. # -sFORCE_FILESYSTEM=1 # force filesystem to load/save files data
  243. # -sASSERTIONS=1 # enable runtime checks for common memory allocation errors (-O1 and above turn it off)
  244. # -sEXPORTED_RUNTIME_METHODS=ccall # require exporting some LEGACY_RUNTIME functions, ccall() is required by miniaudio
  245. # -sGL_ENABLE_GET_PROC_ADDRESS # enable using the *glGetProcAddress() family of functions, required for extensions loading
  246. # --profiling # include information for code profiling
  247. # --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
  248. # --preload-file resources # specify a resources folder for data compilation
  249. # --source-map-base # allow debugging in browser with source map
  250. LDFLAGS += -sUSE_GLFW=3 -sASYNCIFY -sEXPORTED_RUNTIME_METHODS=ccall
  251. # NOTE: Flags required for WebGL 2.0 (OpenGL ES 3.0)
  252. # WARNING: Requires raylib compiled with GRAPHICS_API_OPENGL_ES3
  253. ifeq ($(USE_WEBGL2),TRUE)
  254. LDFLAGS += -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2
  255. endif
  256. # NOTE: Simple raylib examples are compiled to be interpreter with asyncify, that way,
  257. # we can compile same code for ALL platforms with no change required, but, working on bigger
  258. # projects, code needs to be refactored to avoid a blocking while() loop, moving Update and Draw
  259. # logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.
  260. # NOTE: Additional compilate flags for TOTAL_MEMORY, FORCE_FILESYSTEM and resources loading
  261. # are specified per-example for optimization
  262. # Define a custom shell .html and output extension
  263. LDFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
  264. EXT = .html
  265. endif
  266. # Define libraries required on linking: LDLIBS
  267. # NOTE: To link libraries (lib<name>.so or lib<name>.a), use -l<name>
  268. #------------------------------------------------------------------------------------------------
  269. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  270. ifeq ($(PLATFORM_OS),WINDOWS)
  271. # Libraries for Windows desktop compilation
  272. # NOTE: WinMM library required to set high-res timer resolution
  273. LDLIBS = -lraylib -lopengl32 -lgdi32 -lwinmm
  274. endif
  275. ifeq ($(PLATFORM_OS),LINUX)
  276. # Libraries for Debian GNU/Linux desktop compiling
  277. # NOTE: Required packages: libegl1-mesa-dev
  278. LDLIBS = -lraylib -lGL -lm -lpthread -ldl -lrt
  279. # On X11 requires also below libraries
  280. LDLIBS += -lX11
  281. # NOTE: It seems additional libraries are not required any more, latest GLFW just dlopen them
  282. #LDLIBS += -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
  283. # On Wayland windowing system, additional libraries requires
  284. ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
  285. LDLIBS += -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
  286. endif
  287. # Explicit link to libc
  288. ifeq ($(RAYLIB_LIBTYPE),SHARED)
  289. LDLIBS += -lc
  290. endif
  291. # NOTE: On ARM 32bit arch, miniaudio requires atomics library
  292. LDLIBS += -latomic
  293. endif
  294. ifeq ($(PLATFORM_OS),OSX)
  295. # Libraries for OSX 10.9 desktop compiling
  296. # NOTE: Required packages: libopenal-dev libegl1-mesa-dev
  297. LDLIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreAudio -framework CoreVideo
  298. endif
  299. ifeq ($(PLATFORM_OS),BSD)
  300. # Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling
  301. # NOTE: Required packages: mesa-libs
  302. LDLIBS = -lraylib -lGL -lpthread -lm
  303. # On XWindow requires also below libraries
  304. LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
  305. endif
  306. ifeq ($(USE_EXTERNAL_GLFW),TRUE)
  307. # NOTE: It could require additional packages installed: libglfw3-dev
  308. LDLIBS += -lglfw
  309. endif
  310. endif
  311. ifeq ($(PLATFORM),PLATFORM_DRM)
  312. # Libraries for DRM compiling
  313. # NOTE: Required packages: libasound2-dev (ALSA)
  314. LDLIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lgbm -ldrm -ldl -latomic
  315. endif
  316. ifeq ($(PLATFORM),PLATFORM_WEB)
  317. # Libraries for web (HTML5) compiling
  318. LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a
  319. endif
  320. # Define source code object files required
  321. #------------------------------------------------------------------------------------------------
  322. CORE = \
  323. core/core_2d_camera \
  324. core/core_2d_camera_mouse_zoom \
  325. core/core_2d_camera_platformer \
  326. core/core_2d_camera_split_screen \
  327. core/core_3d_camera_first_person \
  328. core/core_3d_camera_free \
  329. core/core_3d_camera_mode \
  330. core/core_3d_camera_split_screen \
  331. core/core_3d_picking \
  332. core/core_automation_events \
  333. core/core_basic_screen_manager \
  334. core/core_basic_window \
  335. core/core_custom_frame_control \
  336. core/core_custom_logging \
  337. core/core_drop_files \
  338. core/core_input_gamepad \
  339. core/core_input_gamepad_info \
  340. core/core_input_gestures \
  341. core/core_input_gestures_web \
  342. core/core_input_keys \
  343. core/core_input_mouse \
  344. core/core_input_mouse_wheel \
  345. core/core_input_multitouch \
  346. core/core_input_virtual_controls \
  347. core/core_loading_thread \
  348. core/core_random_sequence \
  349. core/core_random_values \
  350. core/core_scissor_test \
  351. core/core_smooth_pixelperfect \
  352. core/core_storage_values \
  353. core/core_vr_simulator \
  354. core/core_window_flags \
  355. core/core_window_letterbox \
  356. core/core_window_should_close \
  357. core/core_world_screen
  358. SHAPES = \
  359. shapes/shapes_basic_shapes \
  360. shapes/shapes_bouncing_ball \
  361. shapes/shapes_collision_area \
  362. shapes/shapes_colors_palette \
  363. shapes/shapes_draw_circle_sector \
  364. shapes/shapes_draw_rectangle_rounded \
  365. shapes/shapes_draw_ring \
  366. shapes/shapes_easings_ball_anim \
  367. shapes/shapes_easings_box_anim \
  368. shapes/shapes_easings_rectangle_array \
  369. shapes/shapes_following_eyes \
  370. shapes/shapes_lines_bezier \
  371. shapes/shapes_logo_raylib \
  372. shapes/shapes_logo_raylib_anim \
  373. shapes/shapes_rectangle_scaling \
  374. shapes/shapes_splines_drawing \
  375. shapes/shapes_top_down_lights
  376. TEXTURES = \
  377. textures/textures_background_scrolling \
  378. textures/textures_blend_modes \
  379. textures/textures_bunnymark \
  380. textures/textures_draw_tiled \
  381. textures/textures_fog_of_war \
  382. textures/textures_gif_player \
  383. textures/textures_image_drawing \
  384. textures/textures_image_generation \
  385. textures/textures_image_kernel \
  386. textures/textures_image_loading \
  387. textures/textures_image_processing \
  388. textures/textures_image_rotate \
  389. textures/textures_image_text \
  390. textures/textures_logo_raylib \
  391. textures/textures_mouse_painting \
  392. textures/textures_npatch_drawing \
  393. textures/textures_particles_blending \
  394. textures/textures_polygon \
  395. textures/textures_raw_data \
  396. textures/textures_sprite_anim \
  397. textures/textures_sprite_button \
  398. textures/textures_sprite_explosion \
  399. textures/textures_srcrec_dstrec \
  400. textures/textures_textured_curve \
  401. textures/textures_to_image
  402. TEXT = \
  403. text/text_codepoints_loading \
  404. text/text_draw_3d \
  405. text/text_font_filters \
  406. text/text_font_loading \
  407. text/text_font_sdf \
  408. text/text_font_spritefont \
  409. text/text_format_text \
  410. text/text_input_box \
  411. text/text_raylib_fonts \
  412. text/text_rectangle_bounds \
  413. text/text_unicode \
  414. text/text_writing_anim
  415. MODELS = \
  416. models/models_animation \
  417. models/models_gpu_skinning \
  418. models/models_billboard \
  419. models/models_box_collisions \
  420. models/models_cubicmap \
  421. models/models_draw_cube_texture \
  422. models/models_first_person_maze \
  423. models/models_geometric_shapes \
  424. models/models_heightmap \
  425. models/models_loading \
  426. models/models_loading_gltf \
  427. models/models_loading_m3d \
  428. models/models_loading_vox \
  429. models/models_mesh_generation \
  430. models/models_mesh_picking \
  431. models/models_orthographic_projection \
  432. models/models_point_rendering \
  433. models/models_rlgl_solar_system \
  434. models/models_skybox \
  435. models/models_waving_cubes \
  436. models/models_yaw_pitch_roll
  437. SHADERS = \
  438. shaders/shaders_basic_lighting \
  439. shaders/shaders_custom_uniform \
  440. shaders/shaders_deferred_render \
  441. shaders/shaders_eratosthenes \
  442. shaders/shaders_fog \
  443. shaders/shaders_hot_reloading \
  444. shaders/shaders_hybrid_render \
  445. shaders/shaders_julia_set \
  446. shaders/shaders_lightmap \
  447. shaders/shaders_mesh_instancing \
  448. shaders/shaders_model_shader \
  449. shaders/shaders_multi_sample2d \
  450. shaders/shaders_palette_switch \
  451. shaders/shaders_postprocessing \
  452. shaders/shaders_raymarching \
  453. shaders/shaders_shadowmap \
  454. shaders/shaders_shapes_textures \
  455. shaders/shaders_simple_mask \
  456. shaders/shaders_spotlight \
  457. shaders/shaders_texture_drawing \
  458. shaders/shaders_texture_outline \
  459. shaders/shaders_texture_tiling \
  460. shaders/shaders_texture_waves \
  461. shaders/shaders_write_depth \
  462. shaders/shaders_vertex_displacement
  463. AUDIO = \
  464. audio/audio_mixed_processor \
  465. audio/audio_module_playing \
  466. audio/audio_music_stream \
  467. audio/audio_raw_stream \
  468. audio/audio_sound_loading \
  469. audio/audio_sound_multi \
  470. audio/audio_stream_effects
  471. OTHERS = \
  472. others/easings_testbed \
  473. others/embedded_files_loading \
  474. others/raylib_opengl_interop \
  475. others/raymath_vector_angle \
  476. others/rlgl_compute_shader \
  477. others/rlgl_standalone
  478. CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
  479. # Define processes to execute
  480. #------------------------------------------------------------------------------------------------
  481. # Default target entry
  482. all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO)
  483. core: $(CORE)
  484. shapes: $(SHAPES)
  485. textures: $(TEXTURES)
  486. text: $(TEXT)
  487. models: $(MODELS)
  488. shaders: $(SHADERS)
  489. audio: $(AUDIO)
  490. # Compile CORE examples
  491. core/core_2d_camera: core/core_2d_camera.c
  492. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  493. core/core_2d_camera_mouse_zoom: core/core_2d_camera_mouse_zoom.c
  494. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  495. core/core_2d_camera_platformer: core/core_2d_camera_platformer.c
  496. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  497. core/core_2d_camera_split_screen: core/core_2d_camera_split_screen.c
  498. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  499. core/core_3d_camera_first_person: core/core_3d_camera_first_person.c
  500. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  501. core/core_3d_camera_free: core/core_3d_camera_free.c
  502. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  503. core/core_3d_camera_mode: core/core_3d_camera_mode.c
  504. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  505. core/core_3d_camera_split_screen: core/core_3d_camera_split_screen.c
  506. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  507. core/core_3d_picking: core/core_3d_picking.c
  508. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  509. core/core_automation_events : core/core_automation_events.c
  510. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  511. core/core_basic_window: core/core_basic_window.c
  512. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  513. core/core_basic_screen_manager: core/core_basic_screen_manager.c
  514. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  515. core/core_custom_frame_control: core/core_custom_frame_control.c
  516. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  517. core/core_custom_logging: core/core_custom_logging.c
  518. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  519. core/core_drop_files: core/core_drop_files.c
  520. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 -sFORCE_FILESYSTEM=1
  521. core/core_input_gamepad: core/core_input_gamepad.c
  522. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  523. --preload-file core/resources/ps3.png@resources/ps3.png \
  524. --preload-file core/resources/xbox.png@resources/xbox.png
  525. core/core_input_gamepad_info: core/core_input_gamepad_info.c
  526. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  527. core/core_input_gestures: core/core_input_gestures.c
  528. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  529. core/core_input_gestures_web: core/core_input_gestures_web.c
  530. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  531. core/core_input_keys: core/core_input_keys.c
  532. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  533. core/core_input_mouse: core/core_input_mouse.c
  534. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  535. core/core_input_mouse_wheel: core/core_input_mouse_wheel.c
  536. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  537. core/core_input_multitouch: core/core_input_multitouch.c
  538. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  539. # NOTE: To use multi-threading raylib must be compiled with multi-theading support (-s USE_PTHREADS=1)
  540. # WARNING: For security reasons multi-threading is not supported on browsers, it requires cross-origin isolation (Oct.2021)
  541. # WARNING: It requires raylib to be compiled using -pthread, so atomic operations and thread-local data (if any)
  542. # in its source were transformed to non-atomic operations and non-thread-local data
  543. core/core_loading_thread: core/core_loading_thread.c
  544. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sUSE_PTHREADS=1
  545. core/core_random_sequence: core/core_random_sequence.c
  546. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  547. core/core_random_values: core/core_random_values.c
  548. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  549. core/core_scissor_test: core/core_scissor_test.c
  550. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  551. core/core_smooth_pixelperfect: core/core_smooth_pixelperfect.c
  552. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  553. core/core_storage_values: core/core_storage_values.c
  554. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sFORCE_FILESYSTEM=1
  555. core/core_vr_simulator: core/core_vr_simulator.c
  556. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  557. --preload-file core/resources/distortion100.fs@resources/distortion100.fs
  558. core/core_window_flags: core/core_window_flags.c
  559. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  560. core/core_window_letterbox: core/core_window_letterbox.c
  561. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  562. core/core_window_should_close: core/core_window_should_close.c
  563. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  564. core/core_world_screen: core/core_world_screen.c
  565. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  566. # Compile SHAPES examples
  567. shapes/shapes_basic_shapes: shapes/shapes_basic_shapes.c
  568. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  569. shapes/shapes_bouncing_ball: shapes/shapes_bouncing_ball.c
  570. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  571. shapes/shapes_collision_area: shapes/shapes_collision_area.c
  572. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  573. shapes/shapes_colors_palette: shapes/shapes_colors_palette.c
  574. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  575. shapes/shapes_draw_circle_sector: shapes/shapes_draw_circle_sector.c
  576. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  577. shapes/shapes_draw_rectangle_rounded: shapes/shapes_draw_rectangle_rounded.c
  578. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  579. shapes/shapes_draw_ring: shapes/shapes_draw_ring.c
  580. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  581. shapes/shapes_easings_ball_anim: shapes/shapes_easings_ball_anim.c
  582. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  583. shapes/shapes_easings_box_anim: shapes/shapes_easings_box_anim.c
  584. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  585. shapes/shapes_easings_rectangle_array: shapes/shapes_easings_rectangle_array.c
  586. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  587. shapes/shapes_following_eyes: shapes/shapes_following_eyes.c
  588. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  589. shapes/shapes_lines_bezier: shapes/shapes_lines_bezier.c
  590. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  591. shapes/shapes_logo_raylib: shapes/shapes_logo_raylib.c
  592. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  593. shapes/shapes_logo_raylib_anim: shapes/shapes_logo_raylib_anim.c
  594. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  595. shapes/shapes_rectangle_scaling: shapes/shapes_rectangle_scaling.c
  596. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  597. shapes/shapes_splines_drawing: shapes/shapes_splines_drawing.c
  598. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  599. shapes/shapes_top_down_lights: shapes/shapes_top_down_lights.c
  600. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  601. shapes/shapes_rectangle_advanced: shapes/shapes_rectangle_advanced.c
  602. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  603. # Compile TEXTURES examples
  604. textures/textures_background_scrolling: textures/textures_background_scrolling.c
  605. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  606. --preload-file textures/resources/cyberpunk_street_background.png@resources/cyberpunk_street_background.png \
  607. --preload-file textures/resources/cyberpunk_street_midground.png@resources/cyberpunk_street_midground.png \
  608. --preload-file textures/resources/cyberpunk_street_foreground.png@resources/cyberpunk_street_foreground.png
  609. textures/textures_blend_modes: textures/textures_blend_modes.c
  610. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  611. --preload-file textures/resources/cyberpunk_street_background.png@resources/cyberpunk_street_background.png \
  612. --preload-file textures/resources/cyberpunk_street_foreground.png@resources/cyberpunk_street_foreground.png
  613. textures/textures_bunnymark: textures/textures_bunnymark.c
  614. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  615. --preload-file textures/resources/wabbit_alpha.png@resources/wabbit_alpha.png
  616. textures/textures_draw_tiled: textures/textures_draw_tiled.c
  617. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  618. --preload-file textures/resources/patterns.png@resources/patterns.png
  619. textures/textures_fog_of_war: textures/textures_fog_of_war.c
  620. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  621. textures/textures_gif_player: textures/textures_gif_player.c
  622. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  623. --preload-file textures/resources/scarfy_run.gif@resources/scarfy_run.gif
  624. textures/textures_image_drawing: textures/textures_image_drawing.c
  625. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  626. --preload-file textures/resources/custom_jupiter_crash.png@resources/custom_jupiter_crash.png \
  627. --preload-file textures/resources/parrots.png@resources/parrots.png \
  628. --preload-file textures/resources/cat.png@resources/cat.png
  629. textures/textures_image_generation: textures/textures_image_generation.c
  630. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864
  631. textures/textures_image_kernel: textures/textures_image_kernel.c
  632. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  633. --preload-file textures/resources/cat.png@resources/cat.png
  634. textures/textures_image_loading: textures/textures_image_loading.c
  635. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  636. --preload-file textures/resources/raylib_logo.png@resources/raylib_logo.png
  637. textures/textures_image_processing: textures/textures_image_processing.c
  638. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  639. --preload-file textures/resources/parrots.png@resources/parrots.png
  640. textures/textures_image_rotate: textures/textures_image_rotate.c
  641. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  642. --preload-file textures/resources/raylib_logo.png
  643. textures/textures_image_text: textures/textures_image_text.c
  644. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  645. --preload-file textures/resources/parrots.png@resources/parrots.png \
  646. --preload-file textures/resources/KAISG.ttf@resources/KAISG.ttf
  647. textures/textures_logo_raylib: textures/textures_logo_raylib.c
  648. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  649. --preload-file textures/resources/raylib_logo.png@resources/raylib_logo.png
  650. textures/textures_mouse_painting: textures/textures_mouse_painting.c
  651. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  652. textures/textures_npatch_drawing: textures/textures_npatch_drawing.c
  653. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  654. --preload-file textures/resources/ninepatch_button.png@resources/ninepatch_button.png
  655. textures/textures_particles_blending: textures/textures_particles_blending.c
  656. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  657. --preload-file textures/resources/spark_flame.png@resources/spark_flame.png
  658. textures/textures_polygon: textures/textures_polygon.c
  659. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  660. --preload-file textures/resources/cat.png@resources/cat.png
  661. textures/textures_raw_data: textures/textures_raw_data.c
  662. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  663. --preload-file textures/resources/fudesumi.raw@resources/fudesumi.raw
  664. textures/textures_sprite_anim: textures/textures_sprite_anim.c
  665. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  666. --preload-file textures/resources/scarfy.png@resources/scarfy.png
  667. textures/textures_sprite_button: textures/textures_sprite_button.c
  668. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  669. --preload-file textures/resources/button.png@resources/button.png \
  670. --preload-file textures/resources/buttonfx.wav@resources/buttonfx.wav
  671. textures/textures_sprite_explosion: textures/textures_sprite_explosion.c
  672. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  673. --preload-file textures/resources/explosion.png@resources/explosion.png \
  674. --preload-file textures/resources/boom.wav@resources/boom.wav
  675. textures/textures_srcrec_dstrec: textures/textures_srcrec_dstrec.c
  676. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  677. --preload-file textures/resources/scarfy.png@resources/scarfy.png
  678. textures/textures_textured_curve: textures/textures_textured_curve.c
  679. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  680. --preload-file textures/resources/road.png@resources/road.png
  681. textures/textures_to_image: textures/textures_to_image.c
  682. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  683. --preload-file textures/resources/raylib_logo.png@resources/raylib_logo.png
  684. # Compile TEXT examples
  685. text/text_codepoints_loading: text/text_codepoints_loading.c
  686. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  687. --preload-file text/resources/DotGothic16-Regular.ttf@resources/DotGothic16-Regular.ttf
  688. text/text_draw_3d: text/text_draw_3d.c
  689. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  690. --preload-file text/resources/shaders/glsl100/alpha_discard.fs@resources/shaders/glsl100/alpha_discard.fs
  691. text/text_font_filters: text/text_font_filters.c
  692. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  693. --preload-file text/resources/KAISG.ttf@resources/KAISG.ttf
  694. text/text_font_loading: text/text_font_loading.c
  695. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  696. --preload-file text/resources/pixantiqua.fnt@resources/pixantiqua.fnt \
  697. --preload-file text/resources/pixantiqua.png@resources/pixantiqua.png \
  698. --preload-file text/resources/pixantiqua.ttf@resources/pixantiqua.ttf
  699. text/text_font_sdf: text/text_font_sdf.c
  700. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  701. --preload-file text/resources/anonymous_pro_bold.ttf@resources/anonymous_pro_bold.ttf \
  702. --preload-file text/resources/shaders/glsl100/sdf.fs@resources/shaders/glsl100/sdf.fs
  703. text/text_font_spritefont: text/text_font_spritefont.c
  704. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  705. --preload-file text/resources/custom_mecha.png@resources/custom_mecha.png \
  706. --preload-file text/resources/custom_alagard.png@resources/custom_alagard.png \
  707. --preload-file text/resources/custom_jupiter_crash.png@resources/custom_jupiter_crash.png
  708. text/text_format_text: text/text_format_text.c
  709. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  710. text/text_input_box: text/text_input_box.c
  711. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  712. text/text_raylib_fonts: text/text_raylib_fonts.c
  713. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  714. --preload-file text/resources/fonts/alagard.png@resources/fonts/alagard.png \
  715. --preload-file text/resources/fonts/pixelplay.png@resources/fonts/pixelplay.png \
  716. --preload-file text/resources/fonts/mecha.png@resources/fonts/mecha.png \
  717. --preload-file text/resources/fonts/setback.png@resources/fonts/setback.png \
  718. --preload-file text/resources/fonts/romulus.png@resources/fonts/romulus.png \
  719. --preload-file text/resources/fonts/pixantiqua.png@resources/fonts/pixantiqua.png \
  720. --preload-file text/resources/fonts/alpha_beta.png@resources/fonts/alpha_beta.png \
  721. --preload-file text/resources/fonts/jupiter_crash.png@resources/fonts/jupiter_crash.png
  722. text/text_rectangle_bounds: text/text_rectangle_bounds.c
  723. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  724. text/text_unicode: text/text_unicode.c
  725. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  726. --preload-file text/resources/dejavu.fnt@resources/dejavu.fnt \
  727. --preload-file text/resources/dejavu.png@resources/dejavu.png \
  728. --preload-file text/resources/noto_cjk.fnt@resources/noto_cjk.fnt \
  729. --preload-file text/resources/noto_cjk.png@resources/noto_cjk.png \
  730. --preload-file text/resources/symbola.fnt@resources/symbola.fnt \
  731. --preload-file text/resources/symbola.png@resources/symbola.png
  732. text/text_writing_anim: text/text_writing_anim.c
  733. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  734. # Compile MODELS examples
  735. models/models_animation: models/models_animation.c
  736. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  737. --preload-file models/resources/models/iqm/guy.iqm@resources/models/iqm/guy.iqm \
  738. --preload-file models/resources/models/iqm/guytex.png@resources/models/iqm/guytex.png \
  739. --preload-file models/resources/models/iqm/guyanim.iqm@resources/models/iqm/guyanim.iqm
  740. models/models_gpu_skinning: models/models_gpu_skinning.c
  741. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  742. --preload-file models/resources/models/gltf/greenman.glb@resources/models/gltf/greenman.glb \
  743. --preload-file models/resources/shaders/glsl100/skinning.vs@resources/shaders/glsl100/skinning.vs \
  744. --preload-file models/resources/shaders/glsl100/skinning.fs@resources/shaders/glsl100/skinning.fs
  745. models/models_billboard: models/models_billboard.c
  746. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  747. --preload-file models/resources/billboard.png@resources/billboard.png
  748. models/models_box_collisions: models/models_box_collisions.c
  749. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  750. models/models_cubicmap: models/models_cubicmap.c
  751. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  752. --preload-file models/resources/cubicmap.png@resources/cubicmap.png \
  753. --preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
  754. models/models_draw_cube_texture: models/models_draw_cube_texture.c
  755. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  756. --preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
  757. models/models_first_person_maze: models/models_first_person_maze.c
  758. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  759. --preload-file models/resources/cubicmap.png@resources/cubicmap.png \
  760. --preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
  761. models/models_geometric_shapes: models/models_geometric_shapes.c
  762. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  763. models/models_heightmap: models/models_heightmap.c
  764. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  765. --preload-file models/resources/heightmap.png@resources/heightmap.png
  766. models/models_loading: models/models_loading.c
  767. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  768. --preload-file models/resources/models/obj/castle.obj@resources/models/obj/castle.obj \
  769. --preload-file models/resources/models/obj/castle_diffuse.png@resources/models/obj/castle_diffuse.png
  770. models/models_loading_gltf: models/models_loading_gltf.c
  771. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  772. --preload-file models/resources/models/gltf/robot.glb@resources/models/gltf/robot.glb
  773. models/models_loading_m3d: models/models_loading_m3d.c
  774. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  775. --preload-file models/resources/models/m3d/cesium_man.m3d@resources/models/m3d/cesium_man.m3d
  776. models/models_loading_vox: models/models_loading_vox.c
  777. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  778. --preload-file models/resources/models/vox/chr_knight.vox@resources/models/vox/chr_knight.vox \
  779. --preload-file models/resources/models/vox/chr_sword.vox@resources/models/vox/chr_sword.vox \
  780. --preload-file models/resources/models/vox/monu9.vox@resources/models/vox/monu9.vox
  781. models/models_mesh_generation: models/models_mesh_generation.c
  782. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  783. models/models_mesh_picking: models/models_mesh_picking.c
  784. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  785. --preload-file models/resources/models/obj/turret.obj@resources/models/obj/turret.obj \
  786. --preload-file models/resources/models/obj/turret_diffuse.png@resources/models/obj/turret_diffuse.png
  787. models/models_orthographic_projection: models/models_orthographic_projection.c
  788. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  789. models/models_rlgl_solar_system: models/models_rlgl_solar_system.c
  790. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  791. models/models_skybox: models/models_skybox.c
  792. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 -sFORCE_FILESYSTEM=1 \
  793. --preload-file models/resources/dresden_square_2k.hdr@resources/dresden_square_2k.hdr \
  794. --preload-file models/resources/shaders/glsl100/skybox.vs@resources/shaders/glsl100/skybox.vs \
  795. --preload-file models/resources/shaders/glsl100/skybox.fs@resources/shaders/glsl100/skybox.fs \
  796. --preload-file models/resources/shaders/glsl100/cubemap.vs@resources/shaders/glsl100/cubemap.vs \
  797. --preload-file models/resources/shaders/glsl100/cubemap.fs@resources/shaders/glsl100/cubemap.fs
  798. models/models_waving_cubes: models/models_waving_cubes.c
  799. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  800. models/models_yaw_pitch_roll: models/models_yaw_pitch_roll.c
  801. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  802. --preload-file models/resources/models/obj/plane.obj@resources/models/obj/plane.obj \
  803. --preload-file models/resources/models/obj/plane_diffuse.png@resources/models/obj/plane_diffuse.png
  804. # Compile SHADER examples
  805. shaders/shaders_basic_lighting: shaders/shaders_basic_lighting.c
  806. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  807. --preload-file shaders/resources/texel_checker.png@resources/texel_checker.png \
  808. --preload-file shaders/resources/shaders/glsl100/lighting.fs@resources/shaders/glsl100/lighting.fs \
  809. --preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs
  810. shaders/shaders_custom_uniform: shaders/shaders_custom_uniform.c
  811. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  812. --preload-file shaders/resources/models/barracks.obj@resources/models/barracks.obj \
  813. --preload-file shaders/resources/models/barracks_diffuse.png@resources/models/barracks_diffuse.png \
  814. --preload-file shaders/resources/shaders/glsl100/swirl.fs@resources/shaders/glsl100/swirl.fs
  815. shaders/shaders_deferred_render: shaders/shaders_deferred_render.c
  816. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  817. --preload-file shaders/resources/fudesumi.png@resources/fudesumi.png \
  818. --preload-file shaders/resources/shaders/glsl330/gbuffer.vs@resources/shaders/glsl330/gbuffer.vs \
  819. --preload-file shaders/resources/shaders/glsl330/gbuffer.fs@resources/shaders/glsl330/gbuffer.fs \
  820. --preload-file shaders/resources/shaders/glsl330/deferred_shading.fs@resources/shaders/glsl330/deferred_shading.fs \
  821. --preload-file shaders/resources/shaders/glsl330/deferred_shading.fs@resources/shaders/glsl330/deferred_shading.fs
  822. shaders/shaders_eratosthenes: shaders/shaders_eratosthenes.c
  823. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  824. --preload-file shaders/resources/shaders/glsl100/eratosthenes.fs@resources/shaders/glsl100/eratosthenes.fs
  825. shaders/shaders_fog: shaders/shaders_fog.c
  826. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  827. --preload-file shaders/resources/texel_checker.png@resources/texel_checker.png \
  828. --preload-file shaders/resources/shaders/glsl100/fog.fs@resources/shaders/glsl100/fog.fs \
  829. --preload-file shaders/resources/shaders/glsl100/lighting.vs@resources/shaders/glsl100/lighting.vs
  830. shaders/shaders_hot_reloading: shaders/shaders_hot_reloading.c
  831. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sFORCE_FILESYSTEM=1 \
  832. --preload-file shaders/resources/shaders/glsl100/reload.fs@resources/shaders/glsl100/reload.fs
  833. shaders/shaders_hybrid_render: shaders/shaders_hybrid_render.c
  834. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  835. --preload-file shaders/resources/shaders/glsl100/hybrid_raymarch.fs@resources/shaders/glsl100/hybrid_raymarch.fs \
  836. --preload-file shaders/resources/shaders/glsl100/hybrid_raster.fs@resources/shaders/glsl100/hybrid_raster.fs
  837. shaders/shaders_julia_set: shaders/shaders_julia_set.c
  838. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  839. --preload-file shaders/resources/shaders/glsl100/julia_set.fs@resources/shaders/glsl100/julia_set.fs
  840. shaders/shaders_lightmap: shaders/shaders_lightmap.c
  841. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sFORCE_FILESYSTEM=1 \
  842. --preload-file shaders/resources/shaders/glsl100/lightmap.vs@resources/shaders/glsl100/lightmap.vs \
  843. --preload-file shaders/resources/shaders/glsl100/lightmap.fs@resources/shaders/glsl100/lightmap.fs \
  844. --preload-file shaders/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png \
  845. --preload-file shaders/resources/spark_flame.png@resources/spark_flame.png
  846. shaders/shaders_mesh_instancing: shaders/shaders_mesh_instancing.c
  847. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  848. --preload-file shaders/resources/shaders/glsl100/lighting_instancing.vs@resources/shaders/glsl100/lighting_instancing.vs \
  849. --preload-file shaders/resources/shaders/glsl100/lighting.fs@resources/shaders/glsl100/lighting.fs
  850. shaders/shaders_model_shader: shaders/shaders_model_shader.c
  851. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  852. --preload-file shaders/resources/models/watermill.obj@resources/models/watermill.obj \
  853. --preload-file shaders/resources/models/watermill_diffuse.png@resources/models/watermill_diffuse.png \
  854. --preload-file shaders/resources/shaders/glsl100/grayscale.fs@resources/shaders/glsl100/grayscale.fs
  855. shaders/shaders_multi_sample2d: shaders/shaders_multi_sample2d.c
  856. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  857. --preload-file shaders/resources/shaders/glsl100/color_mix.fs@resources/shaders/glsl100/color_mix.fs
  858. shaders/shaders_palette_switch: shaders/shaders_palette_switch.c
  859. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  860. --preload-file shaders/resources/shaders/glsl100/palette_switch.fs@resources/shaders/glsl100/palette_switch.fs
  861. shaders/shaders_postprocessing: shaders/shaders_postprocessing.c
  862. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  863. --preload-file shaders/resources/models/church.obj@resources/models/church.obj \
  864. --preload-file shaders/resources/models/church_diffuse.png@resources/models/church_diffuse.png \
  865. --preload-file shaders/resources/shaders/glsl100@resources/shaders/glsl100
  866. shaders/shaders_raymarching: shaders/shaders_raymarching.c
  867. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  868. --preload-file shaders/resources/shaders/glsl100/raymarching.fs@resources/shaders/glsl100/raymarching.fs
  869. shaders/shaders_shapes_textures: shaders/shaders_shapes_textures.c
  870. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  871. --preload-file shaders/resources/fudesumi.png@resources/fudesumi.png \
  872. --preload-file shaders/resources/shaders/glsl100/base.vs@resources/shaders/glsl100/base.vs \
  873. --preload-file shaders/resources/shaders/glsl100/grayscale.fs@resources/shaders/glsl100/grayscale.fs
  874. shaders/shaders_simple_mask: shaders/shaders_simple_mask.c
  875. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  876. --preload-file shaders/resources/plasma.png@resources/plasma.png \
  877. --preload-file shaders/resources/mask.png@resources/mask.png \
  878. --preload-file shaders/resources/shaders/glsl100/mask.fs@resources/shaders/glsl100/mask.fs
  879. shaders/shaders_spotlight: shaders/shaders_spotlight.c
  880. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  881. --preload-file shaders/resources/raysan.png@resources/raysan.png \
  882. --preload-file shaders/resources/shaders/glsl100/spotlight.fs@resources/shaders/glsl100/spotlight.fs
  883. shaders/shaders_texture_drawing: shaders/shaders_texture_drawing.c
  884. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  885. --preload-file shaders/resources/shaders/glsl100/cubes_panning.fs@resources/shaders/glsl100/cubes_panning.fs
  886. shaders/shaders_texture_outline: shaders/shaders_texture_outline.c
  887. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  888. --preload-file shaders/resources/shaders/glsl100/outline.fs@resources/shaders/glsl100/outline.fs \
  889. --preload-file shaders/resources/fudesumi.png@resources/fudesumi.png
  890. shaders/shaders_texture_tiling: shaders/shaders_texture_tiling.c
  891. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  892. --preload-file shaders/resources/shaders/glsl100/tiling.fs@resources/shaders/glsl100/tiling.fs \
  893. --preload-file shaders/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
  894. shaders/shaders_texture_waves: shaders/shaders_texture_waves.c
  895. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  896. --preload-file shaders/resources/space.png@resources/space.png \
  897. --preload-file shaders/resources/shaders/glsl100/wave.fs@resources/shaders/glsl100/wave.fs
  898. shaders/shaders_write_depth: shaders/shaders_write_depth.c
  899. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  900. --preload-file shaders/resources/shaders/glsl100/write_depth.fs@resources/shaders/glsl100/write_depth.fs
  901. # Compile AUDIO examples
  902. audio/audio_mixed_processor: audio/audio_mixed_processor.c
  903. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  904. --preload-file audio/resources/country.mp3@resources/country.mp3 \
  905. --preload-file audio/resources/coin.wav@resources/coin.wav
  906. audio/audio_module_playing: audio/audio_module_playing.c
  907. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  908. --preload-file audio/resources/mini1111.xm@resources/mini1111.xm
  909. audio/audio_music_stream: audio/audio_music_stream.c
  910. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  911. --preload-file audio/resources/country.mp3@resources/country.mp3
  912. audio/audio_raw_stream: audio/audio_raw_stream.c
  913. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864
  914. audio/audio_sound_loading: audio/audio_sound_loading.c
  915. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  916. --preload-file audio/resources/sound.wav@resources/sound.wav \
  917. --preload-file audio/resources/target.ogg@resources/target.ogg
  918. audio/audio_sound_multi: audio/audio_sound_multi.c
  919. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
  920. --preload-file audio/resources/sound.wav@resources/sound.wav
  921. audio/audio_stream_effects: audio/audio_stream_effects.c
  922. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sTOTAL_MEMORY=67108864 \
  923. --preload-file audio/resources/country.mp3@resources/country.mp3
  924. # Compile OTHERS examples
  925. others/easings_testbed: others/easings_testbed.c
  926. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  927. others/embedded_files_loading: others/embedded_files_loading.c
  928. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  929. others/raylib_opengl_interop:
  930. $(info Skipping_others_raylib_opengl_interop)
  931. others/raymath_vector_angle: others/raymath_vector_angle.c
  932. $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
  933. others/rlgl_compute_shader:
  934. $(info Skipping_others_rlgl_compute_shader)
  935. others/rlgl_standalone:
  936. $(info Skipping_others_rlgl_standalone)
  937. # Clean everything
  938. clean:
  939. ifeq ($(PLATFORM),PLATFORM_DESKTOP)
  940. ifeq ($(PLATFORM_OS),WINDOWS)
  941. del *.o *.exe /s
  942. endif
  943. ifeq ($(PLATFORM_OS),LINUX)
  944. find . -type f -executable -delete
  945. rm -fv *.o
  946. endif
  947. ifeq ($(PLATFORM_OS),OSX)
  948. find . -type f -perm +ugo+x -delete
  949. rm -f *.o
  950. endif
  951. endif
  952. ifeq ($(PLATFORM),PLATFORM_DRM)
  953. find . -type f -executable -delete
  954. rm -fv *.o
  955. endif
  956. ifeq ($(PLATFORM),PLATFORM_WEB)
  957. del *.o *.html *.js
  958. endif
  959. @echo Cleaning done