2017-09-12 01:51:29 -05:00
|
|
|
BIN2C = ../../../../src/helper/bin2char.sh
|
|
|
|
|
|
|
|
CROSS_COMPILE ?= arm-none-eabi-
|
|
|
|
|
|
|
|
CC=$(CROSS_COMPILE)gcc
|
|
|
|
OBJCOPY=$(CROSS_COMPILE)objcopy
|
|
|
|
OBJDUMP=$(CROSS_COMPILE)objdump
|
|
|
|
|
|
|
|
CFLAGS = -c -mthumb -mcpu=cortex-m0 -O3 -g
|
|
|
|
|
2020-01-08 03:15:40 -06:00
|
|
|
all: bluenrg-x_write.inc
|
2017-09-12 01:51:29 -05:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
.INTERMEDIATE: bluenrg-x_write.o
|
|
|
|
|
2020-01-08 03:15:40 -06:00
|
|
|
%.o: %.c
|
2017-09-12 01:51:29 -05:00
|
|
|
$(CC) $(CFLAGS) -Wall -Wextra -Wa,-adhln=$*.lst $< -o $@
|
|
|
|
|
|
|
|
%.bin: %.o
|
|
|
|
$(OBJCOPY) -Obinary $< $@
|
|
|
|
|
|
|
|
%.inc: %.bin
|
|
|
|
$(BIN2C) < $< > $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o *.lst *.bin *.inc
|