build: usar SPIR-V pre-compilados en Makefile si glslc no está disponible
Igual que en CMakeLists.txt: si glslc no está en PATH, INCLUDES apunta a shaders/precompiled/ en lugar de build/generated_shaders/. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
14
Makefile
14
Makefile
@@ -65,8 +65,18 @@ APP_SOURCES := $(wildcard source/*.cpp) \
|
||||
# Excluir archivos antiguos si existen
|
||||
APP_SOURCES := $(filter-out source/main_old.cpp, $(APP_SOURCES))
|
||||
|
||||
# Includes
|
||||
INCLUDES := -Isource -Isource/external -Ibuild/generated_shaders
|
||||
# Includes: usar shaders pre-compilados si glslc no está disponible
|
||||
ifeq ($(OS),Windows_NT)
|
||||
GLSLC := $(shell where glslc 2>NUL)
|
||||
else
|
||||
GLSLC := $(shell command -v glslc 2>/dev/null)
|
||||
endif
|
||||
ifeq ($(GLSLC),)
|
||||
SHADER_INCLUDE := -Ishaders/precompiled
|
||||
else
|
||||
SHADER_INCLUDE := -Ibuild/generated_shaders
|
||||
endif
|
||||
INCLUDES := -Isource -Isource/external $(SHADER_INCLUDE)
|
||||
|
||||
# Variables según el sistema operativo
|
||||
CXXFLAGS_BASE := -std=c++20 -Wall
|
||||
|
||||
Reference in New Issue
Block a user