diff --git a/Makefile b/Makefile index eb1813e..687e1a6 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,9 @@ ifeq ($(strip $(DEVKITARM)),) $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM") endif -include $(DEVKITARM)/ds_rules +include $(DEVKITARM)/base_rules + +GCC_VERSION := $(shell $(CC) -dumpversion) #--------------------------------------------------------------------------------- # TARGET is the name of the output @@ -44,7 +46,7 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions ASFLAGS := -g $(ARCH) $(DEFINES) LDFLAGS = -n -nostartfiles -g --specs=../stage2/link.specs $(ARCH) -Wl,--gc-sections,-Map,$(TARGET).map \ - -L$(DEVKITARM)/lib/gcc/arm-none-eabi/5.3.0/be -L$(DEVKITARM)/arm-none-eabi/lib/be + -L$(DEVKITARM)/lib/gcc/arm-none-eabi/$(GCC_VERSION)/be -L$(DEVKITARM)/arm-none-eabi/lib/be LIBS := @@ -140,6 +142,8 @@ $(TARGET)-strip.elf: $(TARGET).elf @$(STRIP) $< -o $@ $(TARGET).elf: $(OFILES) + $(SILENTMSG) linking $(notdir $@) + $(SILENTCMD)$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@ $(ELFLOADER): @$(MAKE) -C $(ROOTDIR)/stage2ldr