diff --git a/.gitmodules b/.gitmodules index eac85c4..3b33f29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ +[submodule "borealis"] + path = libs/borealis + url = https://github.com/natinusala/borealis + branch = legacy [submodule "libusbhsfs"] path = libs/libusbhsfs url = https://github.com/DarkMatterCore/libusbhsfs branch = dev -[submodule "libs/borealis"] - path = libs/borealis - url = https://github.com/natinusala/borealis - branch = main diff --git a/Makefile b/Makefile index b613315..a92ace7 100644 --- a/Makefile +++ b/Makefile @@ -38,46 +38,46 @@ include $(DEVKITPRO)/libnx/switch_rules # NACP building is skipped as well. #--------------------------------------------------------------------------------- -GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -GIT_COMMIT := $(shell git rev-parse --short HEAD) +GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) +GIT_COMMIT := $(shell git rev-parse --short HEAD) -VERSION_MAJOR := 2 -VERSION_MINOR := 0 -VERSION_MICRO := 0 +VERSION_MAJOR := 2 +VERSION_MINOR := 0 +VERSION_MICRO := 0 -APP_TITLE := nxdumptool -APP_AUTHOR := DarkMatterCore -APP_VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO} +APP_TITLE := nxdumptool +APP_AUTHOR := DarkMatterCore +APP_VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO} -TARGET := ${APP_TITLE} -BUILD := build -SOURCES := source source/core source/fatfs -DATA := data -ICON := romfs/icon/${APP_TITLE}.jpg -INCLUDES := include include/core include/fatfs -ROMFS := romfs +TARGET := ${APP_TITLE} +BUILD := build +SOURCES := source source/core source/fatfs +DATA := data +ICON := romfs/icon/${APP_TITLE}.jpg +INCLUDES := include include/core include/fatfs +ROMFS := romfs -USBHSFS_PATH := $(TOPDIR)/libs/libusbhsfs -BOREALIS_PATH := libs/borealis +USBHSFS_PATH := $(TOPDIR)/libs/libusbhsfs -# Output folders for autogenerated files in romfs -OUT_SHADERS := shaders +BOREALIS_PATH := libs/borealis +BOREALIS_RESOURCES := romfs:/ #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE -CFLAGS := -g -Wall -Wno-unused-function -Wno-misleading-indentation -O2 -ffunction-sections $(ARCH) $(DEFINES) $(INCLUDE) -D__SWITCH__ +CFLAGS := -g -Wall -Werror -O2 -ffunction-sections $(ARCH) $(DEFINES) $(INCLUDE) -D__SWITCH__ CFLAGS += -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO} CFLAGS += -DAPP_TITLE=\"${APP_TITLE}\" -DAPP_AUTHOR=\"${APP_AUTHOR}\" -DAPP_VERSION=\"${APP_VERSION}\" CFLAGS += -DGIT_BRANCH=\"${GIT_BRANCH}\" -DGIT_COMMIT=\"${GIT_COMMIT}\" +CFLAGS += -DBOREALIS_RESOURCES="\"${BOREALIS_RESOURCES}\"" CFLAGS += `aarch64-none-elf-pkg-config zlib --cflags` CFLAGS += `aarch64-none-elf-pkg-config libxml-2.0 --cflags` CFLAGS += `aarch64-none-elf-pkg-config json-c --cflags` CFLAGS += `aarch64-none-elf-pkg-config libturbojpeg --cflags` -CXXFLAGS := $(CFLAGS) -std=c++1z -O2 -Wno-volatile +CXXFLAGS := $(CFLAGS) -std=c++1z -O2 -Wno-volatile -Wno-unused-parameter ASFLAGS := -g $(ARCH) LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) @@ -110,7 +110,6 @@ export DEPSDIR := $(CURDIR)/$(BUILD) CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -GLSLFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.glsl))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) #--------------------------------------------------------------------------------- @@ -132,18 +131,6 @@ export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) export OFILES := $(OFILES_BIN) $(OFILES_SRC) export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) -ifneq ($(strip $(ROMFS)),) - ROMFS_TARGETS := - ROMFS_FOLDERS := - ifneq ($(strip $(OUT_SHADERS)),) - ROMFS_SHADERS := $(ROMFS)/$(OUT_SHADERS) - ROMFS_TARGETS += $(patsubst %.glsl, $(ROMFS_SHADERS)/%.dksh, $(GLSLFILES)) - ROMFS_FOLDERS += $(ROMFS_SHADERS) - endif - - export ROMFS_DEPS := $(foreach file,$(ROMFS_TARGETS),$(CURDIR)/$(file)) -endif - export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ -I$(CURDIR)/$(BUILD) @@ -195,55 +182,22 @@ endif .PHONY: $(BUILD) clean clean_all all #--------------------------------------------------------------------------------- -all: $(ROMFS_TARGETS) usbhsfs | $(BUILD) +all: $(BUILD) + +$(BUILD): usbhsfs + @[ -d $@ ] || mkdir -p $@ @MSYS2_ARG_CONV_EXCL="-D;$(MSYS2_ARG_CONV_EXCL)" $(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile usbhsfs: @$(MAKE) --no-print-directory -C $(USBHSFS_PATH) BUILD_TYPE=GPL release -$(BUILD): - @mkdir -p $@ - -ifneq ($(strip $(ROMFS_TARGETS)),) - -$(ROMFS_TARGETS): | $(ROMFS_FOLDERS) - -$(ROMFS_FOLDERS): - @mkdir -p $@ - -$(ROMFS_SHADERS)/%_vsh.dksh: %_vsh.glsl - @echo {vert} $(notdir $<) - @uam -s vert -o $@ $< - -$(ROMFS_SHADERS)/%_tcsh.dksh: %_tcsh.glsl - @echo {tess_ctrl} $(notdir $<) - @uam -s tess_ctrl -o $@ $< - -$(ROMFS_SHADERS)/%_tesh.dksh: %_tesh.glsl - @echo {tess_eval} $(notdir $<) - @uam -s tess_eval -o $@ $< - -$(ROMFS_SHADERS)/%_gsh.dksh: %_gsh.glsl - @echo {geom} $(notdir $<) - @uam -s geom -o $@ $< - -$(ROMFS_SHADERS)/%_fsh.dksh: %_fsh.glsl - @echo {frag} $(notdir $<) - @uam -s frag -o $@ $< - -$(ROMFS_SHADERS)/%.dksh: %.glsl - @echo {comp} $(notdir $<) - @uam -s comp -o $@ $< - -endif - #--------------------------------------------------------------------------------- clean: @echo clean ... ifeq ($(strip $(APP_JSON)),) - @rm -fr $(BUILD) $(ROMFS_FOLDERS) $(TARGET).nro $(TARGET).nacp $(TARGET).elf + @rm -fr $(BUILD) $(TARGET).nro $(TARGET).nacp $(TARGET).elf else - @rm -fr $(BUILD) $(ROMFS_FOLDERS) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf + @rm -fr $(BUILD) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf endif clean_all: clean @@ -263,9 +217,9 @@ ifeq ($(strip $(APP_JSON)),) all : $(OUTPUT).nro ifeq ($(strip $(NO_NACP)),) -$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp $(ROMFS_DEPS) +$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp else -$(OUTPUT).nro : $(OUTPUT).elf $(ROMFS_DEPS) +$(OUTPUT).nro : $(OUTPUT).elf endif else diff --git a/libs/borealis b/libs/borealis index 7a9a085..cbdc1b6 160000 --- a/libs/borealis +++ b/libs/borealis @@ -1 +1 @@ -Subproject commit 7a9a085b9850e56291d71511bc78680e0a5ef5d2 +Subproject commit cbdc1b65314d1eeb2799deae5cf6f113d6d67b46 diff --git a/libs/libusbhsfs b/libs/libusbhsfs index 90d329b..e3b6f1a 160000 --- a/libs/libusbhsfs +++ b/libs/libusbhsfs @@ -1 +1 @@ -Subproject commit 90d329bd449eff7bf929b2ccbefd8acd4134a72a +Subproject commit e3b6f1ad979a0831f0bcc937e07cc391afc68810