You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
stm32-better-blink/Makefile.old

20 lines
366 B
Makefile

TARGET = main
GCCFLAGS = -L../../libopencm3/libopencm3/include -DSTM32F1
LIBS = ../../libopencm3/libopencm3/lib/libopencm3_stm32f1.a
.DEFAULT: compile link
.PHONY: compile flash all link
all: compile link flash
compile: $(TARGET).o
%.o: %.c
arm-none-eabi-gcc -c $(GCCFLAGS) $*.c -o $*.o
link: $(TARGET).bin
%.bin: %.o $(LIBS)
arm-none-eabi-gcc $^ -o $*.bin