Skip to content

Commit ee2e047

Browse files
authored
use shader building rules from 3ds_rules (#55)
1 parent 0f11893 commit ee2e047

File tree

56 files changed

+336
-1790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+336
-1790
lines changed

app_launch/Makefile

+6-32
Original file line numberDiff line numberDiff line change
@@ -209,44 +209,18 @@ $(OUTPUT).elf : $(OFILES)
209209
@$(bin2o)
210210

211211
#---------------------------------------------------------------------------------
212-
.PRECIOUS : %.t3x
212+
.PRECIOUS : %.t3x %.shbin
213213
#---------------------------------------------------------------------------------
214214
%.t3x.o %_t3x.h : %.t3x
215215
#---------------------------------------------------------------------------------
216-
@echo $(notdir $<)
217-
@$(bin2o)
216+
$(SILENTMSG) $(notdir $<)
217+
$(bin2o)
218218

219219
#---------------------------------------------------------------------------------
220-
# rules for assembling GPU shaders
220+
%.shbin.o %_shbin.h : %.shbin
221221
#---------------------------------------------------------------------------------
222-
define shader-as
223-
$(eval CURBIN := $*.shbin)
224-
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
225-
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
226-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
227-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
228-
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
229-
picasso -o $(CURBIN) $1
230-
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
231-
endef
232-
233-
%.shbin.o %_shbin.h : %.v.pica %.g.pica
234-
@echo $(notdir $^)
235-
@$(call shader-as,$^)
236-
237-
%.shbin.o %_shbin.h : %.v.pica
238-
@echo $(notdir $<)
239-
@$(call shader-as,$<)
240-
241-
%.shbin.o %_shbin.h : %.shlist
242-
@echo $(notdir $<)
243-
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
244-
245-
#---------------------------------------------------------------------------------
246-
%.t3x %.h : %.t3s
247-
#---------------------------------------------------------------------------------
248-
@echo $(notdir $<)
249-
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
222+
$(SILENTMSG) $(notdir $<)
223+
$(bin2o)
250224

251225
-include $(DEPSDIR)/*.d
252226

audio/filters/Makefile

+6-32
Original file line numberDiff line numberDiff line change
@@ -209,44 +209,18 @@ $(OUTPUT).elf : $(OFILES)
209209
@$(bin2o)
210210

211211
#---------------------------------------------------------------------------------
212-
.PRECIOUS : %.t3x
212+
.PRECIOUS : %.t3x %.shbin
213213
#---------------------------------------------------------------------------------
214214
%.t3x.o %_t3x.h : %.t3x
215215
#---------------------------------------------------------------------------------
216-
@echo $(notdir $<)
217-
@$(bin2o)
216+
$(SILENTMSG) $(notdir $<)
217+
$(bin2o)
218218

219219
#---------------------------------------------------------------------------------
220-
# rules for assembling GPU shaders
220+
%.shbin.o %_shbin.h : %.shbin
221221
#---------------------------------------------------------------------------------
222-
define shader-as
223-
$(eval CURBIN := $*.shbin)
224-
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
225-
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
226-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
227-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
228-
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
229-
picasso -o $(CURBIN) $1
230-
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
231-
endef
232-
233-
%.shbin.o %_shbin.h : %.v.pica %.g.pica
234-
@echo $(notdir $^)
235-
@$(call shader-as,$^)
236-
237-
%.shbin.o %_shbin.h : %.v.pica
238-
@echo $(notdir $<)
239-
@$(call shader-as,$<)
240-
241-
%.shbin.o %_shbin.h : %.shlist
242-
@echo $(notdir $<)
243-
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
244-
245-
#---------------------------------------------------------------------------------
246-
%.t3x %.h : %.t3s
247-
#---------------------------------------------------------------------------------
248-
@echo $(notdir $<)
249-
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
222+
$(SILENTMSG) $(notdir $<)
223+
$(bin2o)
250224

251225
-include $(DEPSDIR)/*.d
252226

audio/mic/Makefile

+6-32
Original file line numberDiff line numberDiff line change
@@ -209,44 +209,18 @@ $(OUTPUT).elf : $(OFILES)
209209
@$(bin2o)
210210

211211
#---------------------------------------------------------------------------------
212-
.PRECIOUS : %.t3x
212+
.PRECIOUS : %.t3x %.shbin
213213
#---------------------------------------------------------------------------------
214214
%.t3x.o %_t3x.h : %.t3x
215215
#---------------------------------------------------------------------------------
216-
@echo $(notdir $<)
217-
@$(bin2o)
216+
$(SILENTMSG) $(notdir $<)
217+
$(bin2o)
218218

219219
#---------------------------------------------------------------------------------
220-
# rules for assembling GPU shaders
220+
%.shbin.o %_shbin.h : %.shbin
221221
#---------------------------------------------------------------------------------
222-
define shader-as
223-
$(eval CURBIN := $*.shbin)
224-
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
225-
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
226-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
227-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
228-
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
229-
picasso -o $(CURBIN) $1
230-
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
231-
endef
232-
233-
%.shbin.o %_shbin.h : %.v.pica %.g.pica
234-
@echo $(notdir $^)
235-
@$(call shader-as,$^)
236-
237-
%.shbin.o %_shbin.h : %.v.pica
238-
@echo $(notdir $<)
239-
@$(call shader-as,$<)
240-
241-
%.shbin.o %_shbin.h : %.shlist
242-
@echo $(notdir $<)
243-
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
244-
245-
#---------------------------------------------------------------------------------
246-
%.t3x %.h : %.t3s
247-
#---------------------------------------------------------------------------------
248-
@echo $(notdir $<)
249-
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
222+
$(SILENTMSG) $(notdir $<)
223+
$(bin2o)
250224

251225
-include $(DEPSDIR)/*.d
252226

audio/modplug-decoding/Makefile

+6-32
Original file line numberDiff line numberDiff line change
@@ -209,44 +209,18 @@ $(OUTPUT).elf : $(OFILES)
209209
@$(bin2o)
210210

211211
#---------------------------------------------------------------------------------
212-
.PRECIOUS : %.t3x
212+
.PRECIOUS : %.t3x %.shbin
213213
#---------------------------------------------------------------------------------
214214
%.t3x.o %_t3x.h : %.t3x
215215
#---------------------------------------------------------------------------------
216-
@echo $(notdir $<)
217-
@$(bin2o)
216+
$(SILENTMSG) $(notdir $<)
217+
$(bin2o)
218218

219219
#---------------------------------------------------------------------------------
220-
# rules for assembling GPU shaders
220+
%.shbin.o %_shbin.h : %.shbin
221221
#---------------------------------------------------------------------------------
222-
define shader-as
223-
$(eval CURBIN := $*.shbin)
224-
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
225-
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
226-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
227-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
228-
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
229-
picasso -o $(CURBIN) $1
230-
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
231-
endef
232-
233-
%.shbin.o %_shbin.h : %.v.pica %.g.pica
234-
@echo $(notdir $^)
235-
@$(call shader-as,$^)
236-
237-
%.shbin.o %_shbin.h : %.v.pica
238-
@echo $(notdir $<)
239-
@$(call shader-as,$<)
240-
241-
%.shbin.o %_shbin.h : %.shlist
242-
@echo $(notdir $<)
243-
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
244-
245-
#---------------------------------------------------------------------------------
246-
%.t3x %.h : %.t3s
247-
#---------------------------------------------------------------------------------
248-
@echo $(notdir $<)
249-
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
222+
$(SILENTMSG) $(notdir $<)
223+
$(bin2o)
250224

251225
-include $(DEPSDIR)/*.d
252226

audio/opus-decoding/Makefile

+6-32
Original file line numberDiff line numberDiff line change
@@ -209,44 +209,18 @@ $(OUTPUT).elf : $(OFILES)
209209
@$(bin2o)
210210

211211
#---------------------------------------------------------------------------------
212-
.PRECIOUS : %.t3x
212+
.PRECIOUS : %.t3x %.shbin
213213
#---------------------------------------------------------------------------------
214214
%.t3x.o %_t3x.h : %.t3x
215215
#---------------------------------------------------------------------------------
216-
@echo $(notdir $<)
217-
@$(bin2o)
216+
$(SILENTMSG) $(notdir $<)
217+
$(bin2o)
218218

219219
#---------------------------------------------------------------------------------
220-
# rules for assembling GPU shaders
220+
%.shbin.o %_shbin.h : %.shbin
221221
#---------------------------------------------------------------------------------
222-
define shader-as
223-
$(eval CURBIN := $*.shbin)
224-
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
225-
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
226-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
227-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
228-
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
229-
picasso -o $(CURBIN) $1
230-
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
231-
endef
232-
233-
%.shbin.o %_shbin.h : %.v.pica %.g.pica
234-
@echo $(notdir $^)
235-
@$(call shader-as,$^)
236-
237-
%.shbin.o %_shbin.h : %.v.pica
238-
@echo $(notdir $<)
239-
@$(call shader-as,$<)
240-
241-
%.shbin.o %_shbin.h : %.shlist
242-
@echo $(notdir $<)
243-
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
244-
245-
#---------------------------------------------------------------------------------
246-
%.t3x %.h : %.t3s
247-
#---------------------------------------------------------------------------------
248-
@echo $(notdir $<)
249-
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
222+
$(SILENTMSG) $(notdir $<)
223+
$(bin2o)
250224

251225
-include $(DEPSDIR)/*.d
252226

audio/streaming/Makefile

+6-32
Original file line numberDiff line numberDiff line change
@@ -209,44 +209,18 @@ $(OUTPUT).elf : $(OFILES)
209209
@$(bin2o)
210210

211211
#---------------------------------------------------------------------------------
212-
.PRECIOUS : %.t3x
212+
.PRECIOUS : %.t3x %.shbin
213213
#---------------------------------------------------------------------------------
214214
%.t3x.o %_t3x.h : %.t3x
215215
#---------------------------------------------------------------------------------
216-
@echo $(notdir $<)
217-
@$(bin2o)
216+
$(SILENTMSG) $(notdir $<)
217+
$(bin2o)
218218

219219
#---------------------------------------------------------------------------------
220-
# rules for assembling GPU shaders
220+
%.shbin.o %_shbin.h : %.shbin
221221
#---------------------------------------------------------------------------------
222-
define shader-as
223-
$(eval CURBIN := $*.shbin)
224-
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
225-
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
226-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
227-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
228-
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
229-
picasso -o $(CURBIN) $1
230-
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
231-
endef
232-
233-
%.shbin.o %_shbin.h : %.v.pica %.g.pica
234-
@echo $(notdir $^)
235-
@$(call shader-as,$^)
236-
237-
%.shbin.o %_shbin.h : %.v.pica
238-
@echo $(notdir $<)
239-
@$(call shader-as,$<)
240-
241-
%.shbin.o %_shbin.h : %.shlist
242-
@echo $(notdir $<)
243-
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
244-
245-
#---------------------------------------------------------------------------------
246-
%.t3x %.h : %.t3s
247-
#---------------------------------------------------------------------------------
248-
@echo $(notdir $<)
249-
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
222+
$(SILENTMSG) $(notdir $<)
223+
$(bin2o)
250224

251225
-include $(DEPSDIR)/*.d
252226

camera/image/Makefile

+6-32
Original file line numberDiff line numberDiff line change
@@ -209,44 +209,18 @@ $(OUTPUT).elf : $(OFILES)
209209
@$(bin2o)
210210

211211
#---------------------------------------------------------------------------------
212-
.PRECIOUS : %.t3x
212+
.PRECIOUS : %.t3x %.shbin
213213
#---------------------------------------------------------------------------------
214214
%.t3x.o %_t3x.h : %.t3x
215215
#---------------------------------------------------------------------------------
216-
@echo $(notdir $<)
217-
@$(bin2o)
216+
$(SILENTMSG) $(notdir $<)
217+
$(bin2o)
218218

219219
#---------------------------------------------------------------------------------
220-
# rules for assembling GPU shaders
220+
%.shbin.o %_shbin.h : %.shbin
221221
#---------------------------------------------------------------------------------
222-
define shader-as
223-
$(eval CURBIN := $*.shbin)
224-
$(eval DEPSFILE := $(DEPSDIR)/$*.shbin.d)
225-
echo "$(CURBIN).o: $< $1" > $(DEPSFILE)
226-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(CURBIN) | tr . _)`.h
227-
echo "extern const u8" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(CURBIN) | tr . _)`.h
228-
echo "extern const u32" `(echo $(CURBIN) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(CURBIN) | tr . _)`.h
229-
picasso -o $(CURBIN) $1
230-
bin2s $(CURBIN) | $(AS) -o $*.shbin.o
231-
endef
232-
233-
%.shbin.o %_shbin.h : %.v.pica %.g.pica
234-
@echo $(notdir $^)
235-
@$(call shader-as,$^)
236-
237-
%.shbin.o %_shbin.h : %.v.pica
238-
@echo $(notdir $<)
239-
@$(call shader-as,$<)
240-
241-
%.shbin.o %_shbin.h : %.shlist
242-
@echo $(notdir $<)
243-
@$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)$(file)))
244-
245-
#---------------------------------------------------------------------------------
246-
%.t3x %.h : %.t3s
247-
#---------------------------------------------------------------------------------
248-
@echo $(notdir $<)
249-
@tex3ds -i $< -H $*.h -d $*.d -o $*.t3x
222+
$(SILENTMSG) $(notdir $<)
223+
$(bin2o)
250224

251225
-include $(DEPSDIR)/*.d
252226

0 commit comments

Comments
 (0)