@@ -223,38 +223,18 @@ $(OUTPUT).elf : $(OFILES)
223223 @$(bin2o)
224224
225225# ---------------------------------------------------------------------------------
226- .PRECIOUS : % .t3x
226+ .PRECIOUS : % .t3x % .shbin
227227# ---------------------------------------------------------------------------------
228228% .t3x.o % _t3x.h : % .t3x
229229# ---------------------------------------------------------------------------------
230230 @echo $(notdir $<)
231231 @$(bin2o)
232232
233233# ---------------------------------------------------------------------------------
234- # rules for assembling GPU shaders
234+ % .shbin.o % _shbin.h : % .shbin
235235# ---------------------------------------------------------------------------------
236- define shader-as
237- $(eval CURBIN := $* .shbin)
238- $(eval DEPSFILE := $(DEPSDIR ) /$* .shbin.d)
239- echo "$(CURBIN ) .o: $< $1" > $(DEPSFILE )
240- echo "extern const u8" `(echo $(CURBIN ) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN ) | tr . _)`.h
241- echo "extern const u8" `(echo $(CURBIN ) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN ) | tr . _)`.h
242- echo "extern const u32" `(echo $(CURBIN ) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN ) | tr . _)`.h
243- picasso -o $(CURBIN ) $1
244- bin2s $(CURBIN ) | $(AS ) -o $* .shbin.o
245- endef
246-
247- % .shbin.o % _shbin.h : % .v.pica % .g.pica
248- @echo $(notdir $^ )
249- @$(call shader-as,$^ )
250-
251- % .shbin.o % _shbin.h : % .v.pica
252- @echo $(notdir $< )
253- @$(call shader-as,$< )
254-
255- % .shbin.o % _shbin.h : % .shlist
256- @echo $(notdir $< )
257- @$(call shader-as,$(foreach file,$(shell cat $< ) ,$(dir $< )$(file ) ) )
236+ $(SILENTMSG) $(notdir $<)
237+ $(bin2o)
258238
259239# ---------------------------------------------------------------------------------
260240% .t3x % .h : % .t3s
0 commit comments