2016-05-08 18:41:51 +00:00
|
|
|
BIN2C = ../../../src/helper/bin2char.sh
|
|
|
|
|
|
|
|
ARM_CROSS_COMPILE ?= arm-none-eabi-
|
|
|
|
ARM_AS ?= $(ARM_CROSS_COMPILE)as
|
|
|
|
ARM_OBJCOPY ?= $(ARM_CROSS_COMPILE)objcopy
|
|
|
|
|
2016-05-21 22:41:15 +00:00
|
|
|
ARM_AFLAGS = -EL
|
|
|
|
|
2016-05-08 18:12:12 +00:00
|
|
|
arm: armv4_5_crc.inc armv7m_crc.inc
|
|
|
|
|
|
|
|
armv4_5_%.elf: armv4_5_%.s
|
2016-05-21 22:41:15 +00:00
|
|
|
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
2016-05-08 18:12:12 +00:00
|
|
|
|
|
|
|
armv4_5_%.bin: armv4_5_%.elf
|
|
|
|
$(ARM_OBJCOPY) -Obinary $< $@
|
|
|
|
|
|
|
|
armv4_5_%.inc: armv4_5_%.bin
|
|
|
|
$(BIN2C) < $< > $@
|
2016-05-08 18:41:51 +00:00
|
|
|
|
|
|
|
armv7m_%.elf: armv7m_%.s
|
2016-05-21 22:41:15 +00:00
|
|
|
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
2016-05-08 18:41:51 +00:00
|
|
|
|
|
|
|
armv7m_%.bin: armv7m_%.elf
|
|
|
|
$(ARM_OBJCOPY) -Obinary $< $@
|
|
|
|
|
|
|
|
armv7m_%.inc: armv7m_%.bin
|
|
|
|
$(BIN2C) < $< > $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.elf *.bin *.inc
|