diff options
author | Thomas Edvalson | 2016-04-06 02:12:02 -0400 |
---|---|---|
committer | Thomas Edvalson | 2016-04-06 02:12:02 -0400 |
commit | e2b9572a83badb7084f5b54e1a7e108af8e327f6 (patch) | |
tree | da3df5dcf26a03635b5a74ac18ab18ecb7c7fe98 /backends/platform/3ds/3ds.mk | |
parent | f6c3363cf54af1c01efc12a98ab27a8af52aad3e (diff) | |
download | scummvm-rg350-e2b9572a83badb7084f5b54e1a7e108af8e327f6.tar.gz scummvm-rg350-e2b9572a83badb7084f5b54e1a7e108af8e327f6.tar.bz2 scummvm-rg350-e2b9572a83badb7084f5b54e1a7e108af8e327f6.zip |
3DS: Initial commit
Diffstat (limited to 'backends/platform/3ds/3ds.mk')
-rw-r--r-- | backends/platform/3ds/3ds.mk | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/backends/platform/3ds/3ds.mk b/backends/platform/3ds/3ds.mk new file mode 100644 index 0000000000..bd8e743e14 --- /dev/null +++ b/backends/platform/3ds/3ds.mk @@ -0,0 +1,53 @@ +TARGET := scummvm + +APP_TITLE := ScummVM +APP_DESCRIPTION := Point-and-click adventure game engines +APP_AUTHOR := ScummVM Team +APP_ICON := backends/platform/3ds/icon.png + +ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft +CXXFLAGS += -std=gnu++11 +ASFLAGS += -mfloat-abi=hard +LDFLAGS += -specs=3dsx.specs $(ARCH) -L$(DEVKITPRO)/libctru/lib -L$(DEVKITPRO)/portlibs/3ds/lib + +.PHONY: clean_3ds + +all: $(TARGET).3dsx + +clean: clean_3ds + +clean_3ds: + $(RM) $(TARGET).3dsx + +$(TARGET).smdh: $(APP_ICON) $(MAKEFILE_LIST) + @smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@ + @echo built ... $(notdir $@) + +$(TARGET).3dsx: $(EXECUTABLE) $(TARGET).smdh + @3dsxtool $< $@ --smdh=$(TARGET).smdh + @echo built ... $(notdir $@) + +#--------------------------------------------------------------------------------- +# rules for assembling GPU shaders +#--------------------------------------------------------------------------------- +define shader-as + $(eval FILEPATH := $(patsubst %.shbin.o,%.shbin,$@)) + $(eval FILE := $(patsubst %.shbin.o,%.shbin,$(notdir $@))) + picasso -o $(FILEPATH) $1 + bin2s $(FILEPATH) | $(AS) -o $@ + echo "extern const u8" `(echo $(FILE) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"_end[];" > `(echo $(FILEPATH) | tr . _)`.h + echo "extern const u8" `(echo $(FILE) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`"[];" >> `(echo $(FILEPATH) | tr . _)`.h + echo "extern const u32" `(echo $(FILE) | sed -e 's/^\([0-9]\)/_\1/' | tr . _)`_size";" >> `(echo $(FILEPATH) | tr . _)`.h +endef + +%.shbin.o : %.v.pica %.g.pica + @echo $(notdir $^) + @$(call shader-as,$^) + +%.shbin.o : %.v.pica + @echo $(notdir $<) + @$(call shader-as,$<) + +%.shbin.o : %.shlist + @echo $(notdir $<) + @$(call shader-as,$(foreach file,$(shell cat $<),$(dir $<)/$(file))) |