diff --git a/Makefile b/Makefile index a2654f8..b13b667 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,7 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") endif -CC := arm-none-eabi-gcc -AS := arm-none-eabi-as -LD := arm-none-eabi-ld -OC := arm-none-eabi-objcopy +include $(DEVKITARM)/base_tools name := Luma3DS revision := $(shell git describe --tags --match v[0-9]* --abbrev=8 | sed 's/-[0-9]*-g/-/i') @@ -75,7 +72,7 @@ $(dir_out)/arm9loaderhax.bin: $(dir_build)/main.bin $(dir_out) @cp -a $(dir_build)/main.bin $@ $(dir_build)/main.bin: $(dir_build)/main.elf - $(OC) -S -O binary $< $@ + $(OBJCOPY) -S -O binary $< $@ $(dir_build)/main.elf: $(bundled) $(objects) $(LINK.o) -T linker.ld $(OUTPUT_OPTION) $^ diff --git a/haxloader/Makefile b/haxloader/Makefile index a6ba56e..f7e45fe 100644 --- a/haxloader/Makefile +++ b/haxloader/Makefile @@ -4,10 +4,7 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") endif -CC := arm-none-eabi-gcc -AS := arm-none-eabi-as -LD := arm-none-eabi-ld -OC := arm-none-eabi-objcopy +include $(DEVKITARM)/base_tools dir_source := source dir_diffs := diffs @@ -61,7 +58,7 @@ $(dir_out)/mset/$(name).nds: @mv $(dir_cakesrop)/CakesROP.nds $@ $(dir_build)/main.bin: $(dir_build)/main.elf - $(OC) -S -O binary $< $@ + $(OBJCOPY) -S -O binary $< $@ $(dir_build)/main.elf: $(objects) ../$(dir_build)/loader.bin.o $(LINK.o) -T linker.ld $(OUTPUT_OPTION) $^ diff --git a/injector/Makefile b/injector/Makefile index 57be1ba..228e567 100755 --- a/injector/Makefile +++ b/injector/Makefile @@ -6,11 +6,6 @@ endif include $(DEVKITARM)/3ds_rules -CC := arm-none-eabi-gcc -AS := arm-none-eabi-as -LD := arm-none-eabi-ld -OC := arm-none-eabi-objcopy - name := $(shell basename $(CURDIR)) dir_source := source diff --git a/loader/Makefile b/loader/Makefile index 9719ecb..5690092 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -4,10 +4,7 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") endif -CC := arm-none-eabi-gcc -AS := arm-none-eabi-as -LD := arm-none-eabi-ld -OC := arm-none-eabi-objcopy +include $(DEVKITARM)/base_tools name := $(shell basename $(CURDIR)) @@ -31,7 +28,7 @@ clean: @rm -rf $(dir_build) $(dir_out)/$(name).bin: $(dir_build)/$(name).elf - $(OC) -S -O binary $< $@ + $(OBJCOPY) -S -O binary $< $@ $(dir_build)/$(name).elf: $(objects) $(LINK.o) -T linker.ld $(OUTPUT_OPTION) $^