Reorganize output structure
This commit is contained in:
parent
c0f41ac10e
commit
618262f015
@ -22,39 +22,40 @@ ASFLAGS := -mcpu=arm946e-s
|
||||
CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -O2 -flto -ffast-math
|
||||
LDFLAGS := -nostartfiles
|
||||
FLAGS := name=$(name).dat dir_out=$(abspath $(dir_out)) ICON=$(abspath icon.png) APP_DESCRIPTION="Noob-friendly 3DS CFW." APP_AUTHOR="Aurora Wright/TuxSH" --no-print-directory
|
||||
ROP_FLAGS := DATNAME=$(name).dat DISPNAME=$(name)
|
||||
ROPFLAGS := DATNAME=$(name).dat DISPNAME=$(name)
|
||||
|
||||
objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \
|
||||
$(patsubst $(dir_source)/%.c, $(dir_build)/%.o, \
|
||||
$(call rwildcard, $(dir_source), *.s *.c)))
|
||||
|
||||
.PHONY: all
|
||||
all: $(dir_out)/$(name).dat $(dir_out)/3ds/$(name) $(dir_out)/menuhax/boot.3dsx $(dir_out)/$(name).nds
|
||||
all: $(dir_out)/$(name).dat $(dir_out)/hax/3ds/$(name) $(dir_out)/menuhax/boot.3dsx $(dir_out)/mset/$(name).nds
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@$(MAKE) $(FLAGS) -C $(dir_cakebrah) clean
|
||||
@$(MAKE) $(FLAGS) -C $(dir_cakehax) clean
|
||||
@$(MAKE) $(ROP_FLAGS) -C $(dir_cakesrop) clean
|
||||
@$(MAKE) $(ROPFLAGS) -C $(dir_cakesrop) clean
|
||||
@rm -rf $(dir_build)
|
||||
|
||||
$(dir_out)/$(name).dat: $(dir_build)/main.bin
|
||||
@$(MAKE) $(FLAGS) -C $(dir_cakehax) launcher
|
||||
@dd if=$(dir_build)/main.bin of=$@ bs=512 seek=144
|
||||
|
||||
$(dir_out)/3ds/$(name):
|
||||
$(dir_out)/hax/3ds/$(name):
|
||||
@mkdir -p "$@"
|
||||
@$(MAKE) $(FLAGS) -C $(dir_cakebrah)
|
||||
@mv $(dir_out)/$(name).3dsx $(dir_out)/$(name).smdh $@
|
||||
|
||||
$(dir_out)/menuhax/boot.3dsx:
|
||||
$(dir_out)/menuhax/boot.3dsx: $(dir_out)/hax/3ds/$(name)
|
||||
@mkdir -p "$(@D)"
|
||||
@cd $(dir_cakebrah); patch -p1 < ../menuhax.diff; $(MAKE) $(FLAGS); git reset --hard
|
||||
@mv $(dir_out)/$(name).3dsx $@
|
||||
@rm $(dir_out)/$(name).smdh
|
||||
|
||||
$(dir_out)/$(name).nds:
|
||||
@$(MAKE) $(ROP_FLAGS) -C $(dir_cakesrop)
|
||||
$(dir_out)/mset/$(name).nds:
|
||||
@mkdir -p "$(@D)"
|
||||
@$(MAKE) $(ROPFLAGS) -C $(dir_cakesrop)
|
||||
@mv $(dir_cakesrop)/CakesROP.nds $@
|
||||
|
||||
$(dir_build)/main.bin: $(dir_build)/main.elf
|
||||
|
Reference in New Issue
Block a user