aboutsummaryrefslogtreecommitdiff
path: root/projects/bootloader/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'projects/bootloader/Makefile')
-rw-r--r--projects/bootloader/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/projects/bootloader/Makefile b/projects/bootloader/Makefile
new file mode 100644
index 0000000..7cef633
--- /dev/null
+++ b/projects/bootloader/Makefile
@@ -0,0 +1,18 @@
+PROG = bootloader
+
+all: $(PROG:=.elf)
+
+%.elf: %.o $(BOARD_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