#--------------------------------------------------------------------------------- # path to tools - this can be deleted if you set the path in windows #--------------------------------------------------------------------------------- export PATH := $(DEVKITARM)/bin:$(PATH) #--------------------------------------------------------------------------------- # the prefix on the compiler executables #--------------------------------------------------------------------------------- PREFIX := arm-elf- export CC := $(PREFIX)gcc export CXX := $(PREFIX)g++ export AR := $(PREFIX)ar export OBJCOPY := $(PREFIX)objcopy #--------------------------------------------------------------------------------- %.a: #--------------------------------------------------------------------------------- @echo $(notdir $@) @$(AR) -rc $@ $^ #--------------------------------------------------------------------------------- %.o: %.cpp @echo $(notdir $<) @$(CXX) -MMD -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ #--------------------------------------------------------------------------------- %.o: %.c @echo $(notdir $<) @$(CC) -MMD -MF $(DEPSDIR)/$*.d $(CFLAGS) -c $< -o $@ #--------------------------------------------------------------------------------- %.o: %.s @echo $(notdir $<) @$(CC) -MMD -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ #--------------------------------------------------------------------------------- %.o: %.S @echo $(notdir $<) @$(CC) -MMD -MF $(DEPSDIR)/$*.d -x assembler-with-cpp $(ASFLAGS) -c $< -o $@ #--------------------------------------------------------------------------------- # 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 $(