diff --git a/dkarm/rules/base_rules b/dkarm/rules/base_rules index 3b6b4a0..f5fde10 100644 --- a/dkarm/rules/base_rules +++ b/dkarm/rules/base_rules @@ -10,6 +10,7 @@ PREFIX := arm-elf- export CC := $(PREFIX)gcc export CXX := $(PREFIX)g++ +export AS := $(PREFIX)as export AR := $(PREFIX)ar export OBJCOPY := $(PREFIX)objcopy @@ -44,15 +45,11 @@ export OBJCOPY := $(PREFIX)objcopy # canned command sequence for binary data #--------------------------------------------------------------------------------- define bin2o - padbin 4 $(<) - $(OBJCOPY) -I binary -O elf32-littlearm -B arm \ - --rename-section .data=.rodata,readonly,data,contents,alloc \ - --redefine-sym _binary_`(echo $(<) | sed -e 's/^\/\([a-zA-Z]\/\)/\1_/' | tr . _ | tr / _)`_start=`(echo $( `(echo $(> `(echo $(> `(echo $( `(echo $(> `(echo $(> `(echo $(> `(echo $(devkitPro) +endif + +include $(DEVKITARM)/base_rules LIBNDS := $(DEVKITPRO)/libnds @@ -8,16 +12,21 @@ LIBNDS := $(DEVKITPRO)/libnds @echo built ... $(notdir $@) #--------------------------------------------------------------------------------- -%.nds: %.bin +%.nds: %.arm9 @ndstool -c $@ -9 $< @echo built ... $(notdir $@) #--------------------------------------------------------------------------------- -%.bin: %.elf +%.arm9: %.elf @$(OBJCOPY) -O binary $< $@ @echo built ... $(notdir $@) +#--------------------------------------------------------------------------------- +%.arm7: %.elf + @$(OBJCOPY) -O binary $< $@ + @echo built ... $(notdir $@) + #--------------------------------------------------------------------------------- %.elf: - @echo linking binary + @echo linking $(notdir $@) @$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@