mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-17 00:05:20 +02:00
27 lines
481 B
Makefile
27 lines
481 B
Makefile
|
PREFIX = arm-linux-gnueabi-
|
||
|
|
||
|
CC = $(PREFIX)gcc
|
||
|
OBJCOPY = $(PREFIX)objcopy
|
||
|
OBJDUMP = $(PREFIX)objdump
|
||
|
|
||
|
CFLAGS = -Wall -mcpu=cortex-m0 -march=armv6-m -mthumb \
|
||
|
-nostdlib
|
||
|
LDFLAGS = -Tlpc1112fxx2xx.lds
|
||
|
|
||
|
OBJS = test.o
|
||
|
|
||
|
.PHONY: dump clean
|
||
|
|
||
|
test.bin: test.elf
|
||
|
$(OBJCOPY) -j .text -j .data -O binary $< $@ || \
|
||
|
{ rm -f $@; exit 1; }
|
||
|
|
||
|
test.elf: $(OBJS)
|
||
|
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
|
||
|
|
||
|
dump: test.elf
|
||
|
$(OBJDUMP) -d test.elf
|
||
|
|
||
|
clean:
|
||
|
rm -f $(OBJS) test.elf test.bin
|