Build version into cia

This commit is contained in:
Michael Theall 2016-09-17 09:38:20 -05:00
parent 17f1036ca4
commit 2a7aa4955e
3 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,10 @@
.PHONY: all 3dsx cia clean linux
export GITREV := $(shell git rev-parse HEAD 2>/dev/null | cut -c1-8)
export VERSION := 2.2
export VERSION_MAJOR := 2
export VERSION_MINOR := 2
export VERSION_MICRO := 0
export VERSION := $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)
ifneq ($(strip $(GITREV)),)
export VERSION := $(VERSION)-$(GITREV)

View File

@ -176,9 +176,12 @@ endif
$(OUTPUT).3dsx: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
$(OFILES): $(TOPDIR)/Makefile $(TOPDIR)/Makefile.3ds
$(OUTPUT).cia: $(OUTPUT).elf $(OUTPUT).smdh $(TARGET).bnr $(TOPDIR)/$(RSF_FILE)
@makerom -f cia -target t -exefslogo -o $@ \
-elf $(OUTPUT).elf -rsf $(TOPDIR)/$(RSF_FILE) \
-ver "$$(($(VERSION_MAJOR)*1024+$(VERSION_MINOR)*16+$(VERSION_MICRO)))" \
-banner $(TARGET).bnr \
-icon $(OUTPUT).smdh
@echo "built ... $(notdir $@)"

View File

@ -177,7 +177,7 @@ AccessControlInfo:
SystemControlInfo:
SaveDataSize: 0KB # Change if the app uses savedata
RemasterVersion: 2
RemasterVersion: $(VERSION_MAJOR)
StackSize: 0x40000
# Modules that run services listed above should be included below