diff --git a/exceptions/arm11/Makefile b/exceptions/arm11/Makefile index 428f7c5..5906331 100644 --- a/exceptions/arm11/Makefile +++ b/exceptions/arm11/Makefile @@ -15,6 +15,7 @@ name := arm11_exceptions dir_source := source dir_build := build +dir_out := ../../$(dir_build) ASFLAGS := -mcpu=mpcore -mfpu=vfp CFLAGS := -Wall -Wextra -MMD -MP -mthumb -mthumb-interwork $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math @@ -25,13 +26,13 @@ objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ $(call rwildcard, $(dir_source), *.s *.c))) .PHONY: all -all: ../../$(dir_build)/$(name).bin +all: $(dir_out)/$(name).bin .PHONY: clean clean: @rm -rf $(dir_build) -../../$(dir_build)/$(name).bin: $(dir_build)/$(name).elf +$(dir_out)/$(name).bin: $(dir_build)/$(name).elf $(OC) -S -O binary $< $@ $(dir_build)/$(name).elf: $(objects) diff --git a/exceptions/arm9/Makefile b/exceptions/arm9/Makefile index f0a0f33..d6a81ec 100644 --- a/exceptions/arm9/Makefile +++ b/exceptions/arm9/Makefile @@ -15,6 +15,7 @@ name := arm9_exceptions dir_source := source dir_build := build +dir_out := ../../$(dir_build) ASFLAGS := -mcpu=arm946e-s CFLAGS := -Wall -Wextra -MMD -MP -mthumb -mthumb-interwork $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math @@ -25,13 +26,13 @@ objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ $(call rwildcard, $(dir_source), *.s *.c))) .PHONY: all -all: ../../$(dir_build)/$(name).bin +all: $(dir_out)/$(name).bin .PHONY: clean clean: @rm -rf $(dir_build) -../../$(dir_build)/$(name).bin: $(dir_build)/$(name).elf +$(dir_out)/$(name).bin: $(dir_build)/$(name).elf $(OC) -S -O binary $< $@ $(dir_build)/$(name).elf: $(objects) diff --git a/injector/Makefile b/injector/Makefile index 8b74bb7..cc42d07 100755 --- a/injector/Makefile +++ b/injector/Makefile @@ -15,6 +15,7 @@ name := $(shell basename $(CURDIR)) dir_source := source dir_build := build +dir_out := ../$(dir_build) LIBS := -lctru LIBDIRS := $(CTRULIB) @@ -31,13 +32,13 @@ objects = $(patsubst $(dir_source)/%.c, $(dir_build)/%.o, \ $(call rwildcard, $(dir_source), *.s *.c)) .PHONY: all -all: ../$(dir_build)/$(name).bin +all: $(dir_out)/$(name).bin .PHONY: clean clean: @rm -rf $(dir_build) -../$(dir_build)/$(name).bin: $(dir_build)/$(name).elf +$(dir_out)/$(name).bin: $(dir_build)/$(name).elf @makerom -f ncch -rsf loader.rsf -nocodepadding -o $@ -elf $< $(dir_build)/$(name).elf: $(objects) diff --git a/loader/Makefile b/loader/Makefile index 421d9c9..7cf1053 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -15,6 +15,7 @@ name := $(shell basename $(CURDIR)) dir_source := source dir_build := build +dir_out := ../$(dir_build) ASFLAGS := -mcpu=arm946e-s CFLAGS := -Wall -Wextra -MMD -MP -mthumb -mthumb-interwork $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math @@ -25,13 +26,13 @@ objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ $(call rwildcard, $(dir_source), *.s *.c))) .PHONY: all -all: ../$(dir_build)/$(name).bin +all: $(dir_out)/$(name).bin .PHONY: clean clean: @rm -rf $(dir_build) -../$(dir_build)/$(name).bin: $(dir_build)/$(name).elf +$(dir_out)/$(name).bin: $(dir_build)/$(name).elf $(OC) -S -O binary $< $@ $(dir_build)/$(name).elf: $(objects)