2018-05-23 21:20:16 +02:00
|
|
|
ifneq ($(strip $(shell firmtool -v 2>&1 | grep usage)),)
|
|
|
|
|
$(error "Please install firmtool v1.1 or greater")
|
|
|
|
|
endif
|
|
|
|
|
|
2023-01-07 01:58:11 +00:00
|
|
|
# Disable kext and firmlaunch patches, all custom sysmodules except Loader, enable PASLR.
|
|
|
|
|
# Dangerous. Don't enable this unless you know what you're doing!
|
|
|
|
|
export BUILD_FOR_EXPLOIT_DEV ?= 0
|
|
|
|
|
|
|
|
|
|
# Build with O0 & frame pointer information for use with GDB
|
|
|
|
|
export BUILD_FOR_GDB ?= 0
|
|
|
|
|
|
|
|
|
|
# Default 3DSX TitleID for hb:ldr
|
|
|
|
|
export HBLDR_DEFAULT_3DSX_TID ?= 000400000D921E00
|
|
|
|
|
|
|
|
|
|
# What to call the title corresponding to HBLDR_DEFAULT_3DSX_TID
|
|
|
|
|
export HBLDR_DEFAULT_3DSX_TITLE_NAME ?= "hblauncher_loader"
|
|
|
|
|
|
2018-05-23 21:20:16 +02:00
|
|
|
NAME := $(notdir $(CURDIR))
|
|
|
|
|
REVISION := $(shell git describe --tags --match v[0-9]* --abbrev=8 | sed 's/-[0-9]*-g/-/')
|
|
|
|
|
|
|
|
|
|
SUBFOLDERS := sysmodules arm11 arm9 k11_extension
|
|
|
|
|
|
|
|
|
|
.PHONY: all release clean $(SUBFOLDERS)
|
|
|
|
|
|
|
|
|
|
all: boot.firm
|
|
|
|
|
|
|
|
|
|
release: $(NAME)$(REVISION).zip
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
@$(foreach dir, $(SUBFOLDERS), $(MAKE) -C $(dir) clean &&) true
|
2020-07-12 20:39:03 +02:00
|
|
|
@rm -rf *.firm *.zip *.3dsx
|
2018-05-23 21:20:16 +02:00
|
|
|
|
2020-07-09 19:52:55 +01:00
|
|
|
# boot.3dsx comes from https://github.com/fincs/new-hbmenu/releases
|
2024-05-01 13:30:10 +02:00
|
|
|
$(NAME)$(REVISION).zip: hbmenu.zip boot.firm
|
|
|
|
|
@cp $< $@
|
|
|
|
|
@zip $@ boot.firm -x "*.DS_Store*" "*__MACOSX*"
|
2018-05-23 21:20:16 +02:00
|
|
|
|
|
|
|
|
boot.firm: $(SUBFOLDERS)
|
|
|
|
|
@firmtool build $@ -D sysmodules/sysmodules.bin arm11/arm11.elf arm9/arm9.elf k11_extension/k11_extension.elf \
|
2018-05-26 12:25:24 +02:00
|
|
|
-A 0x18180000 -C XDMA XDMA NDMA XDMA
|
2018-05-23 21:20:16 +02:00
|
|
|
@echo built... $(notdir $@)
|
|
|
|
|
|
2024-05-01 13:30:10 +02:00
|
|
|
hbmenu.zip:
|
|
|
|
|
@curl -sSfL $(shell curl -s https://api.github.com/repos/devkitPro/3ds-hbmenu/releases/latest | grep 'browser_' | cut -d\" -f4) -o $@
|
2020-07-16 18:06:14 +01:00
|
|
|
@echo downloaded... $(notdir $@)
|
2020-07-12 20:39:03 +02:00
|
|
|
|
2018-05-23 21:20:16 +02:00
|
|
|
$(SUBFOLDERS):
|
|
|
|
|
@$(MAKE) -C $@ all
|