]> cvs.zerfleddert.de Git - proxmark3-svn/blame - bootrom/Makefile
Consolidate Linux/Windows Makefiles into one, see http://www.proxmark.org/forum/topic...
[proxmark3-svn] / bootrom / Makefile
CommitLineData
7e931bbd 1# Makefile for bootrom, see ../common/Makefile.common for common settings\r
2include ../common/Makefile.common\r
6658905f 3\r
4OBJJTAG = $(OBJDIR)/bootrom.o $(OBJDIR)/ram-reset.o $(OBJDIR)/usb.o\r
6658905f 5OBJFLASH = $(OBJDIR)/flash-reset.o $(OBJDIR)/fromflash.o\r
6\r
7e931bbd 7THUMBSRC = usb.c fromflash.c bootrom.c\r
8ASMSRC = ram-reset.s flash-reset.s\r
6658905f 9\r
7e931bbd 10THUMBOBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(THUMBSRC))\r
11ASMOBJ = $(patsubst %.s,$(OBJDIR)/%.o,$(ASMSRC))\r
6658905f 12\r
7e931bbd 13all: bootrom-merged.s19\r
6658905f 14\r
7e931bbd 15bootrom-merged.s19: $(OBJDIR)/bootrom.s19 $(OBJDIR)/bootrom-forjtag.s19\r
16 perl ../tools/merge-srec.pl $(OBJDIR)/bootrom.s19 $(OBJDIR)/bootrom-forjtag.s19 > bootrom-merged.s19\r
6658905f 17\r
7e931bbd 18$(OBJDIR)/bootrom.elf: $(OBJFLASH)\r
19 $(LD) -g -Tldscript-flash --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r
6658905f 20\r
7e931bbd 21$(OBJDIR)/bootrom-forjtag.elf: $(OBJJTAG)\r
22 $(LD) -g -Tldscript-ram-jtag --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r
6658905f 23\r
7e931bbd 24$(OBJDIR)/%.s19: $(OBJDIR)/%.elf\r
25 $(OBJCOPY) -Osrec --srec-forceS3 $^ $@\r
6658905f 26\r
7e931bbd 27$(THUMBOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)\r
28 $(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $< \r
6658905f 29\r
7e931bbd 30$(ASMOBJ): $(OBJDIR)/%.o: %.s\r
31 $(CC) $(CFLAGS) -mthumb-interwork -o $@ $<\r
6658905f 32\r
33clean:\r
7e931bbd 34 $(DELETE) $(OBJDIR)$(PATHSEP)*.o\r
35 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf\r
36 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19\r
37 $(DELETE) $(OBJDIR)$(PATHSEP)*.map\r
38 $(DELETE) bootrom-merged.s19\r
39\r
40.PHONY: all clean help\r
41help:\r
42 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)\r
43 @echo Possible targets:\r
44 @echo + all - Make bootrom-merged.s19, the main bootrom\r
45 @echo + clean - Clean $(OBJDIR)\r
Impressum, Datenschutz