]> git.zerfleddert.de Git - proxmark3-svn/blob - bootrom/Makefile
Move most rules to Makefile.common
[proxmark3-svn] / bootrom / Makefile
1 # Makefile for bootrom, see ../common/Makefile.common for common settings
2
3 OBJJTAG = $(OBJDIR)/bootrom.o $(OBJDIR)/ram-reset.o $(OBJDIR)/usb.o
4 OBJFLASH = $(OBJDIR)/flash-reset.o $(OBJDIR)/fromflash.o
5
6 THUMBSRC = usb.c fromflash.c bootrom.c
7 ASMSRC = ram-reset.s flash-reset.s
8
9 # Do not move this inclusion before the definition of {THUMB,ASM,ARM}{OBJ,SRC}
10 include ../common/Makefile.common
11
12 all: bootrom-merged.s19
13
14 bootrom-merged.s19: $(OBJDIR)/bootrom.s19 $(OBJDIR)/bootrom-forjtag.s19
15 perl ../tools/merge-srec.pl $(OBJDIR)/bootrom.s19 $(OBJDIR)/bootrom-forjtag.s19 > bootrom-merged.s19
16
17 $(OBJDIR)/bootrom.elf: $(OBJFLASH)
18 $(LD) -g -Tldscript-flash --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
19
20 $(OBJDIR)/bootrom-forjtag.elf: $(OBJJTAG)
21 $(LD) -g -Tldscript-ram-jtag --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
22
23 clean:
24 $(DELETE) $(OBJDIR)$(PATHSEP)*.o
25 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf
26 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19
27 $(DELETE) $(OBJDIR)$(PATHSEP)*.map
28 $(DELETE) $(OBJDIR)$(PATHSEP)*.d
29 $(DELETE) bootrom-merged.s19
30
31 .PHONY: all clean help
32 help:
33 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)
34 @echo Possible targets:
35 @echo + all - Make bootrom-merged.s19, the main bootrom
36 @echo + clean - Clean $(OBJDIR)
Impressum, Datenschutz