hocclk: build system changes
- update C++ version to GNU23, change how build scripts behave and more
This commit is contained in:
@@ -20,7 +20,7 @@ make -j$CORES
|
|||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
mkdir -p "$DIST_DIR/atmosphere/contents/$TITLE_ID/flags"
|
mkdir -p "$DIST_DIR/atmosphere/contents/$TITLE_ID/flags"
|
||||||
cp -vf "$ROOT_DIR/sysmodule/out/horizon-oc.nsp" "$DIST_DIR/atmosphere/contents/$TITLE_ID/exefs.nsp"
|
cp -vf "$ROOT_DIR/sysmodule/out/hoc-clk.nsp" "$DIST_DIR/atmosphere/contents/$TITLE_ID/exefs.nsp"
|
||||||
>"$DIST_DIR/atmosphere/contents/$TITLE_ID/flags/boot2.flag"
|
>"$DIST_DIR/atmosphere/contents/$TITLE_ID/flags/boot2.flag"
|
||||||
cp -vf "$ROOT_DIR/sysmodule/toolbox.json" "$DIST_DIR/atmosphere/contents/$TITLE_ID/toolbox.json"
|
cp -vf "$ROOT_DIR/sysmodule/toolbox.json" "$DIST_DIR/atmosphere/contents/$TITLE_ID/toolbox.json"
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ CFLAGS += -DUI_OVERRIDE_PATH="\"$(UI_OVERRIDE_PATH)\""
|
|||||||
#CFLAGS += -DNO_FSTREAM_DIRECTIVE=$(NO_FSTREAM_DIRECTIVE)
|
#CFLAGS += -DNO_FSTREAM_DIRECTIVE=$(NO_FSTREAM_DIRECTIVE)
|
||||||
|
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) -fno-exceptions -std=gnu++20
|
CXXFLAGS := $(CFLAGS) -fno-exceptions -std=gnu++23
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ include $(DEVKITPRO)/libnx/switch_rules
|
|||||||
# INCLUDES is a list of directories containing header files
|
# INCLUDES is a list of directories containing header files
|
||||||
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm".
|
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm".
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
TARGET := horizon-oc
|
TARGET := hoc-clk
|
||||||
|
CONFIG_DIR := horizon-oc
|
||||||
BUILD := build
|
BUILD := build
|
||||||
OUTDIR := out
|
OUTDIR := out
|
||||||
RESOURCES := res
|
RESOURCES := res
|
||||||
@@ -35,7 +36,7 @@ TARGET_VERSION := $(shell git describe --dirty --always --tags)
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
DEFINES := -DDISABLE_IPC -DTARGET="\"$(TARGET)\"" -DTARGET_VERSION="\"$(TARGET_VERSION)\""
|
DEFINES := -DDISABLE_IPC -DTARGET="\"$(TARGET)\"" -DTARGET_VERSION="\"$(TARGET_VERSION)\"" -DCONFIG_DIR="\"$(CONFIG_DIR)\""
|
||||||
|
|
||||||
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ CFLAGS := -g -Wall -Os -ffunction-sections \
|
|||||||
|
|
||||||
CFLAGS += $(INCLUDE) -D__SWITCH__
|
CFLAGS += $(INCLUDE) -D__SWITCH__
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) -fno-rtti -std=gnu++17
|
CXXFLAGS := $(CFLAGS) -fno-rtti -std=gnu++23
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@@ -257,8 +257,8 @@ namespace config {
|
|||||||
|
|
||||||
std::vector<std::string> keys;
|
std::vector<std::string> keys;
|
||||||
std::vector<std::string> values;
|
std::vector<std::string> values;
|
||||||
keys.reserve(HocClkProfile_EnumMax * HocClkModule_EnumMax);
|
keys.reserve(+HocClkProfile_EnumMax * +HocClkModule_EnumMax);
|
||||||
values.reserve(HocClkProfile_EnumMax * HocClkModule_EnumMax);
|
values.reserve(+HocClkProfile_EnumMax * +HocClkModule_EnumMax);
|
||||||
|
|
||||||
std::uint32_t* mhz = &profiles->mhz[0];
|
std::uint32_t* mhz = &profiles->mhz[0];
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <hocclk.h>
|
#include <hocclk.h>
|
||||||
|
|
||||||
#define FILE_CONFIG_DIR "/config/" TARGET
|
#define FILE_CONFIG_DIR "/config/" CONFIG_DIR
|
||||||
#define FILE_FLAG_CHECK_INTERVAL_NS (10000ULL * 1000000000ULL)
|
#define FILE_FLAG_CHECK_INTERVAL_NS (10000ULL * 1000000000ULL)
|
||||||
#define FILE_CONTEXT_CSV_PATH FILE_CONFIG_DIR "/context.csv"
|
#define FILE_CONTEXT_CSV_PATH FILE_CONFIG_DIR "/context.csv"
|
||||||
#define FILE_LOG_FLAG_PATH FILE_CONFIG_DIR "/log.flag"
|
#define FILE_LOG_FLAG_PATH FILE_CONFIG_DIR "/log.flag"
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace integrations {
|
|||||||
|
|
||||||
bool GetRETROSuperStatus() {
|
bool GetRETROSuperStatus() {
|
||||||
struct stat st = {0};
|
struct stat st = {0};
|
||||||
return stat("sdmc:/config/horizon-oc/retro.flag", &st) == 0;
|
return stat("sdmc:/config/horizon-oc/retro.flag", &st) == 0; // TODO: unhardcode this
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadSaltyNX() {
|
void LoadSaltyNX() {
|
||||||
|
|||||||
Reference in New Issue
Block a user