mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
Move most rules to Makefile.common
Add automatic dependency generation Compile ISO14443 files in ARM mode, as was the case with the Linux Makefile before
This commit is contained in:
parent
97a82e8f36
commit
0fc0fca583
3 changed files with 68 additions and 34 deletions
|
@ -1,5 +1,4 @@
|
|||
# Makefile for bootrom, see ../common/Makefile.common for common settings
|
||||
include ../common/Makefile.common
|
||||
|
||||
OBJJTAG = $(OBJDIR)/bootrom.o $(OBJDIR)/ram-reset.o $(OBJDIR)/usb.o
|
||||
OBJFLASH = $(OBJDIR)/flash-reset.o $(OBJDIR)/fromflash.o
|
||||
|
@ -7,8 +6,8 @@ OBJFLASH = $(OBJDIR)/flash-reset.o $(OBJDIR)/fromflash.o
|
|||
THUMBSRC = usb.c fromflash.c bootrom.c
|
||||
ASMSRC = ram-reset.s flash-reset.s
|
||||
|
||||
THUMBOBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(THUMBSRC))
|
||||
ASMOBJ = $(patsubst %.s,$(OBJDIR)/%.o,$(ASMSRC))
|
||||
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}{OBJ,SRC}
|
||||
include ../common/Makefile.common
|
||||
|
||||
all: bootrom-merged.s19
|
||||
|
||||
|
@ -21,20 +20,12 @@ $(OBJDIR)/bootrom.elf: $(OBJFLASH)
|
|||
$(OBJDIR)/bootrom-forjtag.elf: $(OBJJTAG)
|
||||
$(LD) -g -Tldscript-ram-jtag --oformat elf32-littlearm -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
|
||||
|
||||
$(OBJDIR)/%.s19: $(OBJDIR)/%.elf
|
||||
$(OBJCOPY) -Osrec --srec-forceS3 $^ $@
|
||||
|
||||
$(THUMBOBJ): $(OBJDIR)/%.o: %.c $(INCLUDES)
|
||||
$(CC) $(CFLAGS) -mthumb -mthumb-interwork -o $@ $<
|
||||
|
||||
$(ASMOBJ): $(OBJDIR)/%.o: %.s
|
||||
$(CC) $(CFLAGS) -mthumb-interwork -o $@ $<
|
||||
|
||||
clean:
|
||||
$(DELETE) $(OBJDIR)$(PATHSEP)*.o
|
||||
$(DELETE) $(OBJDIR)$(PATHSEP)*.elf
|
||||
$(DELETE) $(OBJDIR)$(PATHSEP)*.s19
|
||||
$(DELETE) $(OBJDIR)$(PATHSEP)*.map
|
||||
$(DELETE) $(OBJDIR)$(PATHSEP)*.d
|
||||
$(DELETE) bootrom-merged.s19
|
||||
|
||||
.PHONY: all clean help
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue