aboutsummaryrefslogtreecommitdiff
path: root/projects/bootloader/Makefile
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-05-27 21:58:55 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-05-27 21:58:55 +0200
commit13d9bfb4bf1cfbb3d723c919763bc460c193ed3b (patch)
tree2454a8313689ce2ed92644bc4a449b7fa039f997 /projects/bootloader/Makefile
parent0009ba29bbb3d7ff911b343bafb9a005114ea2d8 (diff)
parent854a8ba169d64a16f5466c0cac9e1aeeff50659d (diff)
Merge branch 'ft-dfu-code-loading'
Diffstat (limited to 'projects/bootloader/Makefile')
-rw-r--r--projects/bootloader/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/projects/bootloader/Makefile b/projects/bootloader/Makefile
new file mode 100644
index 0000000..4eef758
--- /dev/null
+++ b/projects/bootloader/Makefile
@@ -0,0 +1,20 @@
+PROG = bootloader
+
+OBJS = crc32.o dfu.o
+
+all: $(PROG:=.elf)
+
+%.elf: %.o $(BOARD_OBJS) $(OBJS) $(LIBS)
+ $(CC) $(CFLAGS) $^ -o $@ -T$(BOOTLOADER_LDSCRIPT) -g -Wl,-Map=$*.map
+ $(OBJCOPY) -O ihex $*.elf $*.hex
+ $(OBJCOPY) -O binary $*.elf $*.bin
+ $(OBJDUMP) -St $*.elf >$*.lst
+ $(SIZE) $*.elf
+
+clean:
+ rm -f *.o
+ rm -f *.elf
+ rm -f *.hex
+ rm -f *.bin
+ rm -f *.map
+ rm -f *.lst