Added example to build system

This commit is contained in:
luis605
2025-03-26 19:47:45 +00:00
parent eeda7a4b82
commit 8ec52e3b25
6 changed files with 579 additions and 4 deletions

View File

@ -278,7 +278,7 @@ ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
# --source-map-base # allow debugging in browser with source map
# --shell-file shell.html # define a custom shell .html and output extension
LDFLAGS += -sTOTAL_MEMORY=$(BUILD_WEB_HEAP_SIZE) -sFORCE_FILESYSTEM=1 -sEXPORTED_RUNTIME_METHODS=ccall -sMINIFY_HTML=0
# Using GLFW3 library (instead of RGFW)
ifeq ($(PLATFORM),PLATFORM_WEB)
LDFLAGS += -sUSE_GLFW=3
@ -524,6 +524,7 @@ SHADERS = \
shaders/shaders_texture_tiling \
shaders/shaders_texture_waves \
shaders/shaders_vertex_displacement \
shaders/shaders_view_depth \
shaders/shaders_write_depth
AUDIO = \
@ -1149,6 +1150,10 @@ shaders/shaders_texture_waves: shaders/shaders_texture_waves.c
--preload-file shaders/resources/space.png@resources/space.png \
--preload-file shaders/resources/shaders/glsl100/wave.fs@resources/shaders/glsl100/wave.fs
shaders/shaders_view_depth: shaders/shaders_view_depth.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file shaders/resources/shaders/glsl100/write_depth.fs@resources/shaders/glsl100/write_depth.fs
shaders/shaders_write_depth: shaders/shaders_write_depth.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
--preload-file shaders/resources/shaders/glsl100/write_depth.fs@resources/shaders/glsl100/write_depth.fs
@ -1234,4 +1239,3 @@ ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_WEB PLATFORM_WEB_RGFW))
del *.o *.html *.js
endif
@echo Cleaning done