Use title for long name in CIA/3DS build, use spaces for indentation.

This commit is contained in:
Steven Smith 2016-02-06 16:53:54 -08:00
parent ed1f7f74ca
commit 1a647bdd80
2 changed files with 80 additions and 71 deletions

View file

@ -55,6 +55,15 @@ AccessControlInfo:
#- Shop #- Shop
#- Shell #- Shell
#- CategoryHomeMenu #- CategoryHomeMenu
IoAccessControl:
#- FsMountNand
#- FsMountNandRoWrite
#- FsMountTwln
#- FsMountWnand
#- FsMountCardSpi
#- UseSdif3
#- CreateSeed
#- UseCardSpi
# Process Settings # Process Settings
MemoryType : Application # Application/System/Base MemoryType : Application # Application/System/Base

142
make_base
View file

@ -1,13 +1,13 @@
# PROLOGUE # # PROLOGUE #
ifeq ($(TARGET),3DS) ifeq ($(TARGET),3DS)
ifeq ($(strip $(DEVKITPRO)),) ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro") $(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro")
endif endif
ifeq ($(strip $(DEVKITARM)),) ifeq ($(strip $(DEVKITARM)),)
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM") $(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM")
endif endif
endif endif
# TOOLS # # TOOLS #
@ -50,86 +50,86 @@ COMMON_CC_FLAGS := $(sort $(foreach dir,$(SOURCE_DIRS),$(patsubst %,-I$(BUILD_DI
# COMMON LIBRARY SETUP # # COMMON LIBRARY SETUP #
ifeq ($(LIBRARY),1) ifeq ($(LIBRARY),1)
EXTRA_OUTPUT_FILES += $(INCLUDE_DIRS) EXTRA_OUTPUT_FILES += $(INCLUDE_DIRS)
endif endif
# TARGET SETUP # # TARGET SETUP #
ifeq ($(TARGET),3DS) ifeq ($(TARGET),3DS)
ifeq ($(strip $(TITLE)),) ifeq ($(strip $(TITLE)),)
TITLE := $(NAME) TITLE := $(NAME)
endif endif
REMOTE_IP ?= 127.0.0.1 # User-defined REMOTE_IP ?= 127.0.0.1 # User-defined
AR := $(DEVKITARM)/bin/arm-none-eabi-ar AR := $(DEVKITARM)/bin/arm-none-eabi-ar
AS := $(DEVKITARM)/bin/arm-none-eabi-as AS := $(DEVKITARM)/bin/arm-none-eabi-as
CC := $(DEVKITARM)/bin/arm-none-eabi-gcc CC := $(DEVKITARM)/bin/arm-none-eabi-gcc
CXX := $(DEVKITARM)/bin/arm-none-eabi-g++ CXX := $(DEVKITARM)/bin/arm-none-eabi-g++
BIN2S := $(DEVKITARM)/bin/bin2s BIN2S := $(DEVKITARM)/bin/bin2s
SMDHTOOL := $(DEVKITARM)/bin/smdhtool SMDHTOOL := $(DEVKITARM)/bin/smdhtool
_3DSXTOOL := $(DEVKITARM)/bin/3dsxtool _3DSXTOOL := $(DEVKITARM)/bin/3dsxtool
_3DSLINK := $(DEVKITARM)/bin/3dslink _3DSLINK := $(DEVKITARM)/bin/3dslink
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
MAKEROM := $(BUILDTOOLS_DIR)/3ds/makerom.exe MAKEROM := $(BUILDTOOLS_DIR)/3ds/makerom.exe
BANNERTOOL := $(BUILDTOOLS_DIR)/3ds/bannertool.exe BANNERTOOL := $(BUILDTOOLS_DIR)/3ds/bannertool.exe
CITRA := $(BUILDTOOLS_DIR)/3ds/citra/citra.exe CITRA := $(BUILDTOOLS_DIR)/3ds/citra/citra.exe
else else
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
MAKEROM := $(BUILDTOOLS_DIR)/3ds/makerom-linux MAKEROM := $(BUILDTOOLS_DIR)/3ds/makerom-linux
BANNERTOOL := $(BUILDTOOLS_DIR)/3ds/bannertool-linux BANNERTOOL := $(BUILDTOOLS_DIR)/3ds/bannertool-linux
CITRA := $(BUILDTOOLS_DIR)/3ds/citra/citra-linux CITRA := $(BUILDTOOLS_DIR)/3ds/citra/citra-linux
endif endif
ifeq ($(UNAME_S),Darwin) ifeq ($(UNAME_S),Darwin)
MAKEROM := $(BUILDTOOLS_DIR)/3ds/makerom-mac MAKEROM := $(BUILDTOOLS_DIR)/3ds/makerom-mac
BANNERTOOL := $(BUILDTOOLS_DIR)/3ds/bannertool-mac BANNERTOOL := $(BUILDTOOLS_DIR)/3ds/bannertool-mac
CITRA := $(BUILDTOOLS_DIR)/3ds/citra/citra-mac CITRA := $(BUILDTOOLS_DIR)/3ds/citra/citra-mac
endif endif
endif endif
ifeq ($(LIBRARY),1) ifeq ($(LIBRARY),1)
OUTPUT_FILES := $(OUTPUT_DIR)/lib/lib$(STRIPPED_NAME).a OUTPUT_FILES := $(OUTPUT_DIR)/lib/lib$(STRIPPED_NAME).a
else else
OUTPUT_FILES := $(OUTPUT_DIR)/$(STRIPPED_NAME).elf $(OUTPUT_DIR)/3ds/$(STRIPPED_NAME)/$(STRIPPED_NAME).smdh $(OUTPUT_DIR)/3ds/$(STRIPPED_NAME)/$(STRIPPED_NAME).3dsx $(OUTPUT_DIR)/$(STRIPPED_NAME).3ds $(OUTPUT_DIR)/$(STRIPPED_NAME).cia OUTPUT_FILES := $(OUTPUT_DIR)/$(STRIPPED_NAME).elf $(OUTPUT_DIR)/3ds/$(STRIPPED_NAME)/$(STRIPPED_NAME).smdh $(OUTPUT_DIR)/3ds/$(STRIPPED_NAME)/$(STRIPPED_NAME).3dsx $(OUTPUT_DIR)/$(STRIPPED_NAME).3ds $(OUTPUT_DIR)/$(STRIPPED_NAME).cia
endif endif
LD_FLAGS += -specs=3dsx.specs LD_FLAGS += -specs=3dsx.specs
COMMON_CC_FLAGS += -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -DARM11 -D_3DS COMMON_CC_FLAGS += -mword-relocations -fomit-frame-pointer -ffast-math -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -DARM11 -D_3DS
_3DSXTOOL_FLAGS := _3DSXTOOL_FLAGS :=
COMMON_MAKEROM_FLAGS := -rsf $(BUILDTOOLS_DIR)/3ds/template.rsf -target t -exefslogo -icon $(BUILD_DIR)/icon.icn -banner $(BUILD_DIR)/banner.bnr -DAPP_TITLE="$(TITLE)" -DAPP_PRODUCT_CODE="$(PRODUCT_CODE)" -DAPP_UNIQUE_ID="$(UNIQUE_ID)" -DAPP_SYSTEM_MODE="$(SYSTEM_MODE)" -DAPP_SYSTEM_MODE_EXT="$(SYSTEM_MODE_EXT)" COMMON_MAKEROM_FLAGS := -rsf $(BUILDTOOLS_DIR)/3ds/template.rsf -target t -exefslogo -icon $(BUILD_DIR)/icon.icn -banner $(BUILD_DIR)/banner.bnr -DAPP_TITLE="$(TITLE)" -DAPP_PRODUCT_CODE="$(PRODUCT_CODE)" -DAPP_UNIQUE_ID="$(UNIQUE_ID)" -DAPP_SYSTEM_MODE="$(SYSTEM_MODE)" -DAPP_SYSTEM_MODE_EXT="$(SYSTEM_MODE_EXT)"
ifneq ("$(wildcard $(ROMFS_DIR))","") ifneq ("$(wildcard $(ROMFS_DIR))","")
_3DSXTOOL_FLAGS += --romfs=$(ROMFS_DIR) _3DSXTOOL_FLAGS += --romfs=$(ROMFS_DIR)
COMMON_MAKEROM_FLAGS += -DAPP_ROMFS="RootPath: $(ROMFS_DIR)" COMMON_MAKEROM_FLAGS += -DAPP_ROMFS="RootPath: $(ROMFS_DIR)"
endif endif
ifeq ($(suffix $(BANNER_IMAGE)),.cgfx) ifeq ($(suffix $(BANNER_IMAGE)),.cgfx)
BANNER_IMAGE_ARG := -ci BANNER_IMAGE_ARG := -ci
else else
BANNER_IMAGE_ARG := -i BANNER_IMAGE_ARG := -i
endif endif
ifeq ($(suffix $(BANNER_AUDIO)),.cwav) ifeq ($(suffix $(BANNER_AUDIO)),.cwav)
BANNER_AUDIO_ARG := -ca BANNER_AUDIO_ARG := -ca
else else
BANNER_AUDIO_ARG := -a BANNER_AUDIO_ARG := -a
endif endif
else else
AR := ar AR := ar
AS := as AS := as
CC := gcc CC := gcc
CXX := g++ CXX := g++
ifeq ($(LIBRARY),1) ifeq ($(LIBRARY),1)
OUTPUT_FILES := $(OUTPUT_DIR)/lib/lib$(STRIPPED_NAME).a $(OUTPUT_DIR)/lib/lib$(STRIPPED_NAME).so OUTPUT_FILES := $(OUTPUT_DIR)/lib/lib$(STRIPPED_NAME).a $(OUTPUT_DIR)/lib/lib$(STRIPPED_NAME).so
COMMON_CC_FLAGS += -fPIC COMMON_CC_FLAGS += -fPIC
else else
OUTPUT_FILES := $(OUTPUT_DIR)/$(STRIPPED_NAME) OUTPUT_FILES := $(OUTPUT_DIR)/$(STRIPPED_NAME)
endif endif
endif endif
# FINAL COMMON SETUP # # FINAL COMMON SETUP #
@ -138,7 +138,7 @@ CC_FLAGS := $(COMMON_CC_FLAGS) -std=gnu99
CXX_FLAGS := $(COMMON_CC_FLAGS) -std=gnu++11 CXX_FLAGS := $(COMMON_CC_FLAGS) -std=gnu++11
ifneq ($(EXTRA_OUTPUT_FILES),) ifneq ($(EXTRA_OUTPUT_FILES),)
EXTRA_OUTPUT_COPY_CMD := cp -r $(EXTRA_OUTPUT_FILES) $(OUTPUT_DIR) EXTRA_OUTPUT_COPY_CMD := cp -r $(EXTRA_OUTPUT_FILES) $(OUTPUT_DIR)
endif endif
# MAIN RULES # # MAIN RULES #
@ -205,7 +205,7 @@ $(BUILD_DIR)/%.shbin.o: %.shlist
%.icn: $(ICON) %.icn: $(ICON)
@echo $@ @echo $@
@$(BANNERTOOL) makesmdh -s "$(TITLE)" -l "$(DESCRIPTION)" -p "$(AUTHOR)" -i $(ICON) $(ICON_FLAGS) -o $@ > /dev/null @$(BANNERTOOL) makesmdh -s "$(TITLE)" -l "$(TITLE)" -p "$(AUTHOR)" -i $(ICON) $(ICON_FLAGS) -o $@ > /dev/null
%.smdh: $(ICON) %.smdh: $(ICON)
@echo $@ @echo $@