25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1232 lines
58 KiB

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