mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-26 04:02:11 +00:00
Use legacy Borealis.
This commit is contained in:
parent
194389b73f
commit
3d5b3757ec
4 changed files with 35 additions and 81 deletions
8
.gitmodules
vendored
8
.gitmodules
vendored
|
@ -1,8 +1,8 @@
|
||||||
|
[submodule "borealis"]
|
||||||
|
path = libs/borealis
|
||||||
|
url = https://github.com/natinusala/borealis
|
||||||
|
branch = legacy
|
||||||
[submodule "libusbhsfs"]
|
[submodule "libusbhsfs"]
|
||||||
path = libs/libusbhsfs
|
path = libs/libusbhsfs
|
||||||
url = https://github.com/DarkMatterCore/libusbhsfs
|
url = https://github.com/DarkMatterCore/libusbhsfs
|
||||||
branch = dev
|
branch = dev
|
||||||
[submodule "libs/borealis"]
|
|
||||||
path = libs/borealis
|
|
||||||
url = https://github.com/natinusala/borealis
|
|
||||||
branch = main
|
|
||||||
|
|
104
Makefile
104
Makefile
|
@ -38,46 +38,46 @@ include $(DEVKITPRO)/libnx/switch_rules
|
||||||
# NACP building is skipped as well.
|
# NACP building is skipped as well.
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
GIT_COMMIT := $(shell git rev-parse --short HEAD)
|
GIT_COMMIT := $(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
VERSION_MAJOR := 2
|
VERSION_MAJOR := 2
|
||||||
VERSION_MINOR := 0
|
VERSION_MINOR := 0
|
||||||
VERSION_MICRO := 0
|
VERSION_MICRO := 0
|
||||||
|
|
||||||
APP_TITLE := nxdumptool
|
APP_TITLE := nxdumptool
|
||||||
APP_AUTHOR := DarkMatterCore
|
APP_AUTHOR := DarkMatterCore
|
||||||
APP_VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}
|
APP_VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}
|
||||||
|
|
||||||
TARGET := ${APP_TITLE}
|
TARGET := ${APP_TITLE}
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := source source/core source/fatfs
|
SOURCES := source source/core source/fatfs
|
||||||
DATA := data
|
DATA := data
|
||||||
ICON := romfs/icon/${APP_TITLE}.jpg
|
ICON := romfs/icon/${APP_TITLE}.jpg
|
||||||
INCLUDES := include include/core include/fatfs
|
INCLUDES := include include/core include/fatfs
|
||||||
ROMFS := romfs
|
ROMFS := romfs
|
||||||
|
|
||||||
USBHSFS_PATH := $(TOPDIR)/libs/libusbhsfs
|
USBHSFS_PATH := $(TOPDIR)/libs/libusbhsfs
|
||||||
BOREALIS_PATH := libs/borealis
|
|
||||||
|
|
||||||
# Output folders for autogenerated files in romfs
|
BOREALIS_PATH := libs/borealis
|
||||||
OUT_SHADERS := shaders
|
BOREALIS_RESOURCES := romfs:/
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
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 += -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 += -DAPP_TITLE=\"${APP_TITLE}\" -DAPP_AUTHOR=\"${APP_AUTHOR}\" -DAPP_VERSION=\"${APP_VERSION}\"
|
||||||
CFLAGS += -DGIT_BRANCH=\"${GIT_BRANCH}\" -DGIT_COMMIT=\"${GIT_COMMIT}\"
|
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 zlib --cflags`
|
||||||
CFLAGS += `aarch64-none-elf-pkg-config libxml-2.0 --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 json-c --cflags`
|
||||||
CFLAGS += `aarch64-none-elf-pkg-config libturbojpeg --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)
|
ASFLAGS := -g $(ARCH)
|
||||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
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)))
|
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||||
GLSLFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.glsl)))
|
|
||||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
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 OFILES := $(OFILES_BIN) $(OFILES_SRC)
|
||||||
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
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)) \
|
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||||
-I$(CURDIR)/$(BUILD)
|
-I$(CURDIR)/$(BUILD)
|
||||||
|
@ -195,55 +182,22 @@ endif
|
||||||
.PHONY: $(BUILD) clean clean_all all
|
.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
|
@MSYS2_ARG_CONV_EXCL="-D;$(MSYS2_ARG_CONV_EXCL)" $(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||||
|
|
||||||
usbhsfs:
|
usbhsfs:
|
||||||
@$(MAKE) --no-print-directory -C $(USBHSFS_PATH) BUILD_TYPE=GPL release
|
@$(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:
|
clean:
|
||||||
@echo clean ...
|
@echo clean ...
|
||||||
ifeq ($(strip $(APP_JSON)),)
|
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
|
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
|
endif
|
||||||
|
|
||||||
clean_all: clean
|
clean_all: clean
|
||||||
|
@ -263,9 +217,9 @@ ifeq ($(strip $(APP_JSON)),)
|
||||||
all : $(OUTPUT).nro
|
all : $(OUTPUT).nro
|
||||||
|
|
||||||
ifeq ($(strip $(NO_NACP)),)
|
ifeq ($(strip $(NO_NACP)),)
|
||||||
$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp $(ROMFS_DEPS)
|
$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp
|
||||||
else
|
else
|
||||||
$(OUTPUT).nro : $(OUTPUT).elf $(ROMFS_DEPS)
|
$(OUTPUT).nro : $(OUTPUT).elf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7a9a085b9850e56291d71511bc78680e0a5ef5d2
|
Subproject commit cbdc1b65314d1eeb2799deae5cf6f113d6d67b46
|
|
@ -1 +1 @@
|
||||||
Subproject commit 90d329bd449eff7bf929b2ccbefd8acd4134a72a
|
Subproject commit e3b6f1ad979a0831f0bcc937e07cc391afc68810
|
Loading…
Reference in a new issue