1 Star 0 Fork 0

YYMMYB/amethyst

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 792 Bytes
一键复制 编辑 原始数据 按行查看 历史
# This Makefile is meant for shader compilation only.
# Use cargo to compile the rust part of the project.
GLSLC = $(shell ./find_glslc.sh)
ifeq "$(GLSLC)" ""
break;
endif
define outpath
$(addsuffix .$(1), $(subst /shaders/,/compiled/,$(2)))
endef
SHADERS = $(filter-out /header/,$(wildcard */shaders/**/*.vert */shaders/**/*.frag))
OUT = $(call outpath,spv,$(SHADERS)) $(call outpath,spvasm,$(SHADERS))
all: $(OUT)
%.spv:
mkdir -p $(dir $@)
$(GLSLC) -MD -c -g -O -o $@ $<
%.spvasm:
mkdir -p $(dir $@)
$(GLSLC) -MD -S -g -O -o $@ $<
define shader_rules
$(call outpath,spv,$1): $1
$(call outpath,spvasm,$1) : $1
endef
$(foreach shader,$(SHADERS),$(eval $(call shader_rules,$(shader))))
clean:
$(RM) */compiled/**/*.spv */compiled/**/*.spvdis */compiled/**/*.d
.PHONY: all clean
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/YYMMYB/amethyst.git
git@gitee.com:YYMMYB/amethyst.git
YYMMYB
amethyst
amethyst
main

搜索帮助