diff --git a/Makefile b/Makefile index b13b667..c8f6d19 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ dir_build := build dir_out := out ASFLAGS := -mcpu=arm946e-s -CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -O2 -flto -ffast-math +CFLAGS := -Wall -Wextra $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math LDFLAGS := -nostartfiles objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ @@ -106,4 +106,3 @@ $(dir_build)/%.o: $(dir_source)/%.c $(bundled) $(dir_build)/%.o: $(dir_source)/%.s @mkdir -p "$(@D)" $(COMPILE.s) $(OUTPUT_OPTION) $< -include $(call rwildcard, $(dir_build), *.d) diff --git a/exceptions/arm11/Makefile b/exceptions/arm11/Makefile index 5906331..c66608e 100644 --- a/exceptions/arm11/Makefile +++ b/exceptions/arm11/Makefile @@ -4,12 +4,7 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") 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 +include $(DEVKITARM)/base_tools name := arm11_exceptions @@ -18,7 +13,7 @@ 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 +CFLAGS := -Wall -Wextra -MMD -MP -mthumb $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math LDFLAGS := -nostdlib objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ @@ -33,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) $(CC) $(LDFLAGS) -T linker.ld $(OUTPUT_OPTION) $^ @@ -45,4 +40,3 @@ $(dir_build)/%.o: $(dir_source)/%.c $(dir_build)/%.o: $(dir_source)/%.s @mkdir -p "$(@D)" $(COMPILE.s) $(OUTPUT_OPTION) $< -include $(call rwildcard, $(dir_build), *.d) diff --git a/exceptions/arm9/Makefile b/exceptions/arm9/Makefile index d6a81ec..357c81c 100644 --- a/exceptions/arm9/Makefile +++ b/exceptions/arm9/Makefile @@ -4,12 +4,7 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") 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 +include $(DEVKITARM)/base_tools name := arm9_exceptions @@ -18,7 +13,7 @@ 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 +CFLAGS := -Wall -Wextra -mthumb $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math LDFLAGS := -nostdlib objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ @@ -33,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) $(CC) $(LDFLAGS) -T linker.ld $(OUTPUT_OPTION) $^ @@ -45,4 +40,3 @@ $(dir_build)/%.o: $(dir_source)/%.c $(dir_build)/%.o: $(dir_source)/%.s @mkdir -p "$(@D)" $(COMPILE.s) $(OUTPUT_OPTION) $< -include $(call rwildcard, $(dir_build), *.d) diff --git a/haxloader/Makefile b/haxloader/Makefile index f7e45fe..73bdab9 100644 --- a/haxloader/Makefile +++ b/haxloader/Makefile @@ -15,7 +15,7 @@ dir_build := build dir_out := ../out ASFLAGS := -mcpu=arm946e-s -CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -fshort-wchar -std=c11 -Wno-main -O2 -flto -ffast-math +CFLAGS := -Wall -Wextra $(ASFLAGS) -fno-builtin -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 ROPFLAGS := DATNAME=$(name).dat DISPNAME=$(name) GRAPHICS=../graphics/ @@ -72,4 +72,3 @@ $(dir_build)/%.o: $(dir_source)/%.c $(bundled) $(dir_build)/%.o: $(dir_source)/%.s @mkdir -p "$(@D)" $(COMPILE.s) $(OUTPUT_OPTION) $< -include $(call rwildcard, $(dir_build), *.d) diff --git a/injector/Makefile b/injector/Makefile index 228e567..b56551c 100755 --- a/injector/Makefile +++ b/injector/Makefile @@ -19,9 +19,8 @@ LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) INCLUDE := $(foreach dir,$(LIBDIRS),-I$(dir)/include) -ASFLAGS := -mcpu=mpcore -mfloat-abi=hard -mtp=soft -CFLAGS := -Wall -Wextra -MMD -MP -marm $(ASFLAGS) -fno-builtin -std=c11 -O2 -flto -ffast-math -mword-relocations \ - -ffunction-sections -fdata-sections $(INCLUDE) -DARM11 -D_3DS +ASFLAGS := -mcpu=mpcore -mfloat-abi=hard +CFLAGS := -Wall -Wextra $(ASFLAGS) -fno-builtin -std=c11 -O2 -flto -ffast-math $(INCLUDE) -DARM11 -D_3DS LDFLAGS := -Xlinker --defsym="__start__=0x14000000" -specs=3dsx.specs $(ASFLAGS) objects = $(patsubst $(dir_source)/%.c, $(dir_build)/%.o, \ @@ -68,4 +67,3 @@ $(dir_build)/%.o: $(dir_source)/%.c $(dir_build)/%.o: $(dir_source)/%.s @mkdir -p "$(@D)" $(COMPILE.s) $(OUTPUT_OPTION) $< -include $(call rwildcard, $(dir_build), *.d) diff --git a/loader/Makefile b/loader/Makefile index 5690092..b33944c 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -13,7 +13,7 @@ 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 +CFLAGS := -Wall -Wextra -mthumb $(ASFLAGS) -fno-builtin -std=c11 -Wno-main -O2 -flto -ffast-math LDFLAGS := -nostdlib objects = $(patsubst $(dir_source)/%.s, $(dir_build)/%.o, \ @@ -42,4 +42,3 @@ $(dir_build)/%.o: $(dir_source)/%.c $(dir_build)/%.o: $(dir_source)/%.s @mkdir -p "$(@D)" $(COMPILE.s) $(OUTPUT_OPTION) $< -include $(call rwildcard, $(dir_build), *.d)