Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
77bc961
Wifi backup integration
DefKorns Sep 3, 2026
e032f87
Update README and mod readme to include new contributions and features
DefKorns Sep 3, 2026
e852b20
Add .gitattributes to enforce LF line endings and specify binary files
DefKorns Sep 5, 2026
44211cd
Add 8x8 font files for extended Latin and Hiragana characters
DefKorns Sep 5, 2026
c3c94d0
Change file permissions from executable to non-executable for various…
DefKorns Sep 5, 2026
e58d9c9
Fix formatting of copyright notice in controller.h
DefKorns Sep 5, 2026
c054375
Refactor README formatting and remove outdated mod readme file
DefKorns Sep 5, 2026
f50fa69
Refactor command names and localization support
DefKorns Sep 7, 2026
50a488a
Add localization source file to build process
DefKorns Sep 7, 2026
8b3b615
Implement retry mechanism for controller initialization on ARM platforms
DefKorns Sep 7, 2026
ca338dc
Add localization support for English and Portuguese, implement gen_sp…
DefKorns Sep 7, 2026
51aeb67
Add delete functionality for saved backups with confirmation prompts
DefKorns Sep 7, 2026
8b51ba7
Update copyright year and shellcheck directives in om_functions script
DefKorns Sep 7, 2026
3a89045
Refactor LoadLanguage function to support plugin localization directo…
DefKorns Sep 7, 2026
2e94d49
Add error messages for network and package issues, enhance command st…
DefKorns Sep 7, 2026
cc7e2fe
Add English and Portuguese language support files, update language di…
DefKorns Sep 7, 2026
3f4f62e
Add build and Docker configuration files for cross-compilation
DefKorns Sep 7, 2026
021f481
Add language support for French, German, Spanish, Italian, Dutch; upd…
DefKorns Sep 7, 2026
2688107
Add 8x8 Katakana font support and integrate into text rendering
DefKorns Sep 9, 2026
ed06362
Refactor options menu scripts and UI components
DefKorns Sep 9, 2026
41fb058
Refactor options menu commands and scripts
DefKorns Sep 10, 2026
3d5733a
Update submodule configuration and enhance RADebug script for better …
DefKorns Sep 10, 2026
3e3aa81
Update toolchain subproject commit reference
DefKorns Sep 10, 2026
708e458
Add support for TTF font rendering and improve text handling
DefKorns Sep 10, 2026
ba96884
Add Modern UI drawing helpers and enhance SDL context management
DefKorns Sep 11, 2026
c25ecac
remove ClassicUI
DefKorns Sep 11, 2026
aff4815
Enhance preview image handling in main UI rendering
DefKorns Sep 11, 2026
2515483
Refine README for clarity on backup deletion and remove Modern UI sec…
DefKorns Sep 11, 2026
86d92a5
Refactor contributions section in README for clarity and consistency
DefKorns Sep 11, 2026
e4840fb
Update build workflow to improve vendor repo handling and toolchain i…
DefKorns Sep 11, 2026
2203fa6
Update GitHub Actions to use latest action versions for checkout, upl…
DefKorns Sep 11, 2026
40734ba
Add build and license badges to README for improved visibility
DefKorns Sep 11, 2026
7486a5b
Add option combo configuration messages in multiple languages
DefKorns Sep 11, 2026
cf4adac
Remove unused build target and clean up Makefile
DefKorns Sep 11, 2026
f00489b
Fix power-off hang, Back navigation, and auto-detect the launch combo
DefKorns Sep 11, 2026
07791dd
Reorder menu commands into logical groups, sync docs
DefKorns Sep 11, 2026
c62bdec
Support both RetroArch builds (Neo, discontinued, and _km Ozone)
DefKorns Sep 11, 2026
162cb20
Revert vsync/Shutdown/power-button _exit bypass
DefKorns Sep 11, 2026
026d1b3
Extract LoadLanguageFromConfig, dedupe ChangeCombo intro lines, upx it
DefKorns Sep 11, 2026
49228ef
Deduplicate UTF-8 decode and font8x8 glyph lookup
DefKorns Sep 11, 2026
3fb9ba8
Fix mod_uninstall failing to find libSDL2_ttf/libfreetype
DefKorns Sep 11, 2026
dcf34a8
Redesign mod_uninstall with Modern UI chrome
DefKorns Sep 11, 2026
d30df3b
Add PREVIEW_NEAREST for nearest-neighbor preview scaling
DefKorns Sep 16, 2026
798db78
Update switch_on and switch_off images for improved UI
DefKorns Sep 16, 2026
e07cc5d
Add previewSquare option for square/near-square preview art
DefKorns Sep 16, 2026
432526f
Implement keyboard fallback for desktop testing in Controller class
DefKorns Sep 16, 2026
bca82b5
Refine keyboard fallback for desktop builds in Controller::Update
DefKorns Sep 17, 2026
3457763
Implement hold-to-repeat functionality for direction buttons in main …
DefKorns Sep 17, 2026
9fc8926
Move hold-to-repeat into Controller, add DrawRoundedCornerMask helper
DefKorns Sep 17, 2026
2c0247f
Add SUBMENU support to various command configurations
DefKorns Sep 17, 2026
80e05bd
Add PREVIEW_GRID_COLS command field for grid column overrides
DefKorns Sep 18, 2026
6c3d40e
Add theme configuration support and update UI colors
DefKorns Sep 18, 2026
d27cf24
Add opt-in FIX_LIBSTDCXX build for libstdc++ hmod conflicts
DefKorns Sep 20, 2026
c87ad15
Add PREVIEW_FIT_CONTAIN and PREVIEW_HIDE_LABEL command fields
DefKorns Sep 20, 2026
813f39c
Update README: PREVIEW_FIT_CONTAIN/PREVIEW_HIDE_LABEL and FIX_LIBSTDCXX
DefKorns Sep 20, 2026
76fb008
Fix language directory path in translate function
DefKorns Sep 20, 2026
1f65fdd
Add ENABLE_IF command field and implementation for conditional execution
DefKorns Sep 20, 2026
e5b0747
Add commands for saving and restoring game data, and update language …
DefKorns Sep 20, 2026
2a0218f
Refactor Makefile for cleanup and streamline binary stripping; enhanc…
DefKorns Sep 20, 2026
c0f5470
Add conditional check for badgeB drawing based on backStack state
DefKorns Sep 20, 2026
565e091
Implement back command logic for root screen; modify badge behavior f…
DefKorns Sep 20, 2026
89ab978
Update build configuration to use classicmini-cross-toolchain for Doc…
DefKorns Sep 20, 2026
d291937
Bump toolchain submodule to pick up git/rsync and the classicmini-cro…
DefKorns Sep 20, 2026
6baf1bc
Refactor comments for clarity in command and main files
DefKorns Sep 21, 2026
2bce3c1
Refactor comments for clarity and consistency across multiple files
DefKorns Sep 21, 2026
406ad3d
Make point buffers static in draw_helpers to avoid per-frame allocation
DefKorns Sep 23, 2026
faf900e
Replace hand-drawn preview icons with Bootstrap Icons
DefKorns Sep 24, 2026
9977ebf
Add language code badges as language previews
DefKorns Sep 24, 2026
ccc484a
Add per-command preview icons
DefKorns Sep 24, 2026
324fcd1
Use Bootstrap chevrons for submenu and scroll arrows, add ScrollArrow…
DefKorns Sep 24, 2026
45b0270
Remove redundant Exit row from root screen
DefKorns Sep 25, 2026
c46e78a
Apply C++ Core Guidelines to DefKorns-authored sources
DefKorns Sep 25, 2026
e32b11b
Replace RGB triples and packed colors with a Color type
DefKorns Sep 25, 2026
a4762af
Mark hyphenated version tags as prereleases
DefKorns Sep 25, 2026
5fc3f8b
Update README for 2.0.0-alpha
DefKorns Sep 25, 2026
fbd9dcc
Build the _compat hmod in CI alongside the plain one
DefKorns Sep 25, 2026
cfb7e3f
Add numero sign to the Latin font and CJK punctuation to the 8x8 font
DefKorns Sep 25, 2026
7609718
Tag the compat hmod's Name with (compat)
DefKorns Sep 25, 2026
bf58623
Add S8104CleanExtraCovers script to remove unnecessary cover images
DefKorns Oct 6, 2026
b673707
Refactor install script to improve cleanup process and ensure a clean…
DefKorns Oct 6, 2026
6d8053b
Redesign the Module Uninstaller as a checklist that returns to Advanc…
DefKorns Oct 6, 2026
79576d5
Skip the output screen for silent commands and refresh all toggle states
DefKorns Oct 6, 2026
5fbf6cf
Move controller settings and diagnostics into Advanced Options submenus
DefKorns Oct 6, 2026
ec26204
Hide the RetroArch menu when RetroArch isn't installed
DefKorns Oct 6, 2026
dff1bf8
Rename the boot cleanup script and remove stale RetroArch defaults
DefKorns Oct 6, 2026
fbdc5be
Apply snake_case/camelCase naming to every OptionsMenu shell script
DefKorns Oct 6, 2026
4f0ba3e
Keep CI builds from reporting a dirty tree
DefKorns Oct 6, 2026
fe8f456
List the current menus and options in the hmod readme
DefKorns Oct 6, 2026
73c051d
Build and release through hmod-build as options_menu
DefKorns Oct 7, 2026
e90e576
Build and release through hmod-build as options_menu
DefKorns Oct 7, 2026
7dc5255
Rewrite the readme for Options Menu v2
DefKorns Oct 7, 2026
67112cd
Set the hmod category to its tab in the hub
DefKorns Oct 7, 2026
3b9b9f5
Stop an INTERNAL command and its children when B aborts it
DefKorns Oct 7, 2026
72f2f4b
Refactor and clean up code across multiple files
DefKorns Oct 7, 2026
3f393cf
Share badges and a dimmed confirm dialog across Options Menu screens
DefKorns Oct 7, 2026
f7fc180
Read every Clovercon pad, including hakchi's virtual USB pads
DefKorns Oct 7, 2026
a07a5fd
Add a loading splash with an animated progress bar to gen_splash
DefKorns Oct 8, 2026
3850e98
Remove obsolete USB save backup and restore commands
DefKorns Oct 8, 2026
dec109c
Replace the Saved Games submenu with a Save Manager screen
DefKorns Oct 8, 2026
b6f58e4
Pin the hmod-build workflow and submodule to 9f553b5
DefKorns Oct 9, 2026
a0b34cc
Harden argument parsing, child process cleanup and save backup error …
DefKorns Oct 13, 2026
bee6692
Wrap long Save Manager dialog titles
DefKorns Oct 13, 2026
9e4d300
Update hmod-build: changelog in pre-release readmes
DefKorns Oct 13, 2026
12e4d54
Show Hakchi CE game names in the Save Manager removed-games lists
DefKorns Oct 13, 2026
593204f
Remember installed game names and restore single saves from the USB b…
DefKorns Oct 13, 2026
f63298a
Keep game names in the saves folder and record them at boot
DefKorns Oct 13, 2026
c7b40d7
Fix the Wi-Fi restore menu closing the Options Menu
DefKorns Oct 14, 2026
5e336b3
Remove legacy Options Menu v1 files on install
DefKorns Oct 14, 2026
23b8e49
Fix B going unresponsive after a hold on screens without a hold action
DefKorns Oct 14, 2026
8a6863c
Add a shared HTTPS downloader with progress and batch mode
DefKorns Oct 14, 2026
fa5e4cc
Show free space in the downloader progress line
DefKorns Oct 14, 2026
dfea8bb
Trim the downloader comments
DefKorns Oct 14, 2026
5edcb3e
Trim long comments in scripts and the Save Manager
DefKorns Oct 14, 2026
787cb10
Update hmod-build: smoke test of the packaged files
DefKorns Oct 15, 2026
16709b6
Build with the public toolchain and ship its libfreetype.so.6
DefKorns Oct 15, 2026
9dc2496
Pull the toolchain image from GHCR
DefKorns Oct 15, 2026
dd86b3a
Move hmod-build under vendor/ and drop the toolchain submodule
DefKorns Oct 15, 2026
6e1c377
Update hmod-build to v1.1.0
DefKorns Oct 15, 2026
1925c53
Track the build scripts and a .gitignore for build outputs
DefKorns Oct 15, 2026
7a70f0e
Add AxelStone to the testers
DefKorns Oct 15, 2026
e4909ba
Link the downloader with the libraries curl-config reports
DefKorns Oct 16, 2026
4cc4f1b
Update hmod-build to v1.2.0
DefKorns Oct 16, 2026
32fb486
Highlight the active entry with --selectedMarker and confirm entries …
DefKorns Oct 16, 2026
daa21c0
Show flags in the Language screen with a new ROW_ICON command key
DefKorns Oct 20, 2026
59af829
Take the UI font from the toolchain image instead of tracking it
DefKorns Oct 20, 2026
4ae9078
Update hmod-build to v1.3.0
DefKorns Oct 20, 2026
8b4d8f2
Walk long lists by letter, drop the Hakchi-on-USB names search and le…
DefKorns Oct 20, 2026
f1683b1
Update hmod-build to v1.4.0
DefKorns Oct 20, 2026
e013d2f
Validate clovercon.sh parameter names and values before eval
DefKorns Oct 20, 2026
9ec6db8
Update hmod-build to v1.5.0
DefKorns Oct 20, 2026
a13cc84
Merge modern-ui-ttf: Options Menu v2.0.0
DefKorns Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# The mod's scripts and command config files are parsed/executed by the
# console's BusyBox shell and this project's own line-based parsers, neither
# of which tolerate CRLF (a stray \r ends up embedded in paths/values,
# e.g. COMMAND_STR=sh %script_dir%/om_network\r causes "No such file").
# Force LF regardless of platform checkout settings (core.autocrlf, etc.).
* text=auto eol=lf

*.png binary
*.xz binary
*.hmod binary
*.ttf binary
mod/etc/options_menu/retroarch/scripts/RASettingsBackup binary
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build

on:
push:
branches: ['**']
tags: ['v*']
pull_request:

jobs:
hmod:
# Keep in sync with the vendor/hmod-build submodule tag.
uses: DefKorns/hmod-build/.github/workflows/hmod.yml@v1.5.0
with:
release-name: Options Menu
docker: true
# the compat build relinks with its own rpath and adds a private libstdc++
make: |
hmod
hmod FIX_LIBSTDCXX=1
secrets: inherit
permissions:
contents: write
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.o
.build-flags
src/cacert.pem
out/
local/
mod/bin/
!mod/bin/standby
mod/etc/options_menu/lib/
mod/etc/options_menu/optiond
mod/etc/options_menu/options
mod/etc/options_menu/mod_uninstall/mod_uninstall
mod/etc/options_menu/save_manager/save_manager
mod/etc/options_menu/scripts/ChangeCombo
mod/etc/options_menu/scripts/gen_splash
mod/etc/options_menu/scripts/downloader
mod/etc/options_menu/fonts/NotoSansJP-Latin-subset.ttf
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hmod-build"]
path = vendor/hmod-build
url = https://github.com/DefKorns/hmod-build.git
154 changes: 130 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,149 @@
TARGET_NAME = options_deluxe
# FIX_LIBSTDCXX=1 builds the _compat variant: it ships a private libstdc++.so.6
# via rpath, immune to other hmods replacing the system copy (~225KB more).
ifdef FIX_LIBSTDCXX
MOD_ID := options_menu_compat
MOD_NAME := Options Menu (compat)
VARIANT := compat
else
MOD_ID := options_menu
MOD_NAME := Options Menu
VARIANT := plain
endif
MOD_CREATOR := CompCom, DefKorns
MOD_CATEGORY := Options Menu
BINARIES := mod/etc/options_menu/options mod/etc/options_menu/optiond mod/etc/options_menu/mod_uninstall/mod_uninstall mod/etc/options_menu/save_manager/save_manager mod/bin/standby_watchdog mod/etc/options_menu/scripts/gen_splash mod/etc/options_menu/scripts/ChangeCombo mod/etc/options_menu/scripts/downloader

CXX = g++
STRIP = strip
CXXFLAGS = -std=c++11 -Os `sdl2-config --cflags`
LDLIBS = `sdl2-config --libs` -lpng
LDFLAGS =
SOURCES = src/main.cpp src/command.cpp src/framework/sdl_context.cpp src/framework/texture.cpp src/framework/controller.cpp src/framework/powerwatch.cpp
ifdef CROSS_PREFIX
PKG_CONFIG_LIBDIR = /usr/lib/arm-linux-gnueabihf/pkgconfig
SDL_CFLAGS = -I/usr/include/arm-linux-gnueabihf $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --cflags sdl2 SDL2_ttf libpng)
SDL_LIBS = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --libs sdl2 SDL2_ttf libpng)
PNG_LIBS = $(shell PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR) pkg-config --libs libpng)
LDFLAGS = -Wl,--allow-shlib-undefined
VENDORED_LIBS = mod/etc/options_menu/lib/libSDL2_ttf-2.0.so.0 mod/etc/options_menu/lib/libfreetype.so.6
ifdef FIX_LIBSTDCXX
VENDORED_LIBS += mod/etc/options_menu/lib/libstdc++.so.6
STDCXX_RPATH = -Wl,-rpath,/etc/options_menu/lib
STDCXX_RPATH_ORIGIN = -Wl,-rpath,'$$ORIGIN/lib'
endif
else
SDL_CFLAGS = $(shell sdl2-config --cflags) $(shell pkg-config --cflags SDL2_ttf)
SDL_LIBS = $(shell sdl2-config --libs) $(shell pkg-config --libs SDL2_ttf) -lpng
PNG_LIBS = -lpng
LDFLAGS =
VENDORED_LIBS =
endif
CXXFLAGS = -std=c++11 -Os $(SDL_CFLAGS) -DMOD_VERSION=\"v$(MOD_VER)\"
LDLIBS = $(SDL_LIBS)
SOURCES = src/main.cpp src/command.cpp src/localization.cpp src/framework/badge.cpp src/framework/dialog.cpp src/framework/sdl_context.cpp src/framework/texture.cpp src/framework/controller.cpp src/framework/powerwatch.cpp src/framework/draw_helpers.cpp src/framework/utf8.cpp src/framework/font8x8_lookup.cpp src/framework/uitheme.cpp src/framework/list_jump.cpp
OBJECTS = $(SOURCES:.cpp=.o)
ALL_OBJECTS = $(OBJECTS) src/daemon.o src/mod_uninstall.o src/save_manager.o src/standby_watchdog.o src/gen_splash.o src/change_combo.o

MOD_DEPS := $(BINARIES) $(VENDORED_LIBS)
ifndef FIX_LIBSTDCXX
# a prior compat build leaves this behind in mod/
MOD_DEPS += no-private-libstdcxx
endif

# built into the toolchain image from Noto Sans JP (see its README), not tracked
FONT_LATIN := mod/etc/options_menu/fonts/NotoSansJP-Latin-subset.ttf
MOD_DEPS += $(FONT_LATIN)

all: hmod

compile: $(BINARIES) $(VENDORED_LIBS)

all: $(TARGET_NAME).hmod $(TARGET_NAME)_b_down.hmod
# relink everything when switching variant (different rpaths) or version (MOD_VERSION)
.build-flags: FORCE
@[ "$$(cat $@ 2>/dev/null)" = "$(VARIANT) $(MOD_VER)" ] || echo "$(VARIANT) $(MOD_VER)" > $@

$(TARGET_NAME)_b_down.hmod: $(TARGET_NAME).hmod
cp button.cfg mod/etc/options_menu/
cd mod/; tar -czvf "../$(TARGET_NAME)_b_down.hmod" *
$(ALL_OBJECTS): .build-flags

$(TARGET_NAME).hmod: mod/etc/options_menu/options mod/etc/options_menu/optiond mod/etc/options_menu/mod_uninstall/mod_uninstall mod/bin/standby_watchdog
$(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/options
$(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/optiond
$(CROSS_PREFIX)$(STRIP) mod/etc/options_menu/mod_uninstall/mod_uninstall
$(CROSS_PREFIX)$(STRIP) mod/bin/standby_watchdog
rm -f mod/etc/options_menu/button.cfg
cd mod/; tar -czvf "../$(TARGET_NAME).hmod" *
no-private-libstdcxx:
rm -f mod/etc/options_menu/lib/libstdc++.so.6

# SDL2_ttf/freetype aren't on the console's own rootfs; shipped as
# mod/etc/options_menu/lib/*.so and found via rpath instead.
mod/etc/options_menu/options: $(OBJECTS)
$(CROSS_PREFIX)$(CXX) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -o mod/etc/options_menu/options
$(CROSS_PREFIX)$(CXX) $(OBJECTS) $(LDLIBS) $(LDFLAGS) -Wl,-rpath,'$$ORIGIN/lib' -o $@
$(CROSS_PREFIX)$(STRIP) $@

mod/etc/options_menu/lib:
mkdir -p $@

# always copied, so a new image can't leave a stale font behind
$(FONT_LATIN): FORCE
cp /opt/options-menu/fonts/NotoSansJP-Latin-subset.ttf $@

# built from source in the toolchain image, copied in each build
mod/etc/options_menu/lib/libSDL2_ttf-2.0.so.0: | mod/etc/options_menu/lib
cp /usr/lib/arm-linux-gnueabihf/libSDL2_ttf-2.0.so.0 $@

mod/etc/options_menu/lib/libfreetype.so.6: | mod/etc/options_menu/lib
cp /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 $@

mod/etc/options_menu/lib/libstdc++.so.6: | mod/etc/options_menu/lib
cp $$($(CROSS_PREFIX)$(CXX) -print-file-name=libstdc++.so.6) $@
$(CROSS_PREFIX)$(STRIP) --strip-unneeded $@

mod/etc/options_menu/optiond: src/daemon.o src/framework/controller.o
$(CROSS_PREFIX)$(CXX) $(LDFLAGS) src/daemon.o src/framework/controller.o -o mod/etc/options_menu/optiond
$(CROSS_PREFIX)$(CXX) $(LDFLAGS) $^ $(STDCXX_RPATH_ORIGIN) -o $@
$(CROSS_PREFIX)$(STRIP) $@

mod/etc/options_menu/mod_uninstall/mod_uninstall: src/mod_uninstall.o
$(CROSS_PREFIX)$(CXX) src/mod_uninstall.o src/framework/*.o $(LDLIBS) $(LDFLAGS) -o mod/etc/options_menu/mod_uninstall/mod_uninstall
mod/etc/options_menu/mod_uninstall/mod_uninstall: src/mod_uninstall.o src/localization.o $(filter src/framework/%,$(OBJECTS))
$(CROSS_PREFIX)$(CXX) $^ $(LDLIBS) $(LDFLAGS) -Wl,-rpath,/etc/options_menu/lib -o $@
$(CROSS_PREFIX)$(STRIP) $@
upx --lzma $@

mod/etc/options_menu/save_manager/save_manager: src/save_manager.o src/localization.o $(filter src/framework/%,$(OBJECTS))
$(CROSS_PREFIX)$(CXX) $^ $(LDLIBS) $(LDFLAGS) -Wl,-rpath,/etc/options_menu/lib -o $@
$(CROSS_PREFIX)$(STRIP) $@
upx --lzma $@

mod/bin/standby_watchdog: src/standby_watchdog.o src/framework/controller.o src/framework/powerwatch.o
$(CROSS_PREFIX)$(CXX) src/standby_watchdog.o src/framework/controller.o src/framework/powerwatch.o -o mod/bin/standby_watchdog
$(CROSS_PREFIX)$(CXX) $(LDFLAGS) $^ $(STDCXX_RPATH) -o $@
$(CROSS_PREFIX)$(STRIP) $@
upx --lzma $@

mod/etc/options_menu/scripts/gen_splash: src/gen_splash.o src/localization.o src/framework/utf8.o src/framework/font8x8_lookup.o src/framework/uitheme.o
$(CROSS_PREFIX)$(CXX) $^ $(PNG_LIBS) $(LDFLAGS) $(STDCXX_RPATH) -o $@
$(CROSS_PREFIX)$(STRIP) $@

mod/etc/options_menu/scripts/ChangeCombo: src/change_combo.o src/framework/controller.o src/localization.o
$(CROSS_PREFIX)$(CXX) $^ $(LDFLAGS) $(STDCXX_RPATH) -o $@
$(CROSS_PREFIX)$(STRIP) $@
upx --lzma $@

# plain C against the toolchain's static curl: no libstdc++, same in both variants
CC = gcc
CURL_PREFIX = /opt/curl-static
CFLAGS = -std=gnu99 -O2 -Wall -I$(CURL_PREFIX)/include
CURL_LDLIBS = $(shell $(CURL_PREFIX)/bin/curl-config --static-libs)

src/cacert.pem:
curl -fL -o $@ https://curl.se/ca/cacert.pem

# built from inside src/ so the symbols are _binary_cacert_pem_*
src/ca_bundle.o: src/cacert.pem
cd src && $(CROSS_PREFIX)ld -r -b binary -o ca_bundle.o cacert.pem

mod/etc/options_menu/scripts/downloader: src/downloader.o src/ca_bundle.o
$(CROSS_PREFIX)$(CC) $^ $(CURL_LDLIBS) -o $@
$(CROSS_PREFIX)$(STRIP) $@
upx --lzma $@

%.o: %.c
$(CROSS_PREFIX)$(CC) $(CFLAGS) -c $< -o $@

%.o: %.cpp
$(CROSS_PREFIX)$(CXX) $(CXXFLAGS) -c $< -o $@

clean:
find -name "*.o" -type f -delete
rm -f mod/etc/options_menu/options mod/etc/options_menu/optiond mod/etc/options_menu/mod_uninstall/mod_uninstall mod/bin/standby_watchdog mod/etc/options_menu/button.cfg $(TARGET_NAME).hmod $(TARGET_NAME)_b_down.hmod
find . -name "*.o" -type f -not -path "./vendor/*" -delete
rm -f $(BINARIES) .build-flags
rm -rf mod/etc/options_menu/lib out/

include vendor/hmod-build/hmod.mk

.PHONY: clean
.PHONY: all compile clean no-private-libstdcxx
Loading
Loading