]> cvs.zerfleddert.de Git - proxmark3-svn/blob - armsrc/Makefile
Add command and code for bidirectional LF emulation of Hitag2. Should be extended...
[proxmark3-svn] / armsrc / Makefile
1 # Makefile for armsrc, see ../common/Makefile.common for common settings
2
3 APP_INCLUDES = apps.h
4
5 # Add the "-DWITH_LCD" flag in APP_CLFAGS to add support for LCD
6 # and add SRC_LCD to THUMBSRC
7 APP_CFLAGS = -O6
8
9 SRC_LCD = fonts.c LCD.c
10
11 THUMBSRC = start.c \
12 appmain.c \
13 lfops.c \
14 iso15693.c \
15 util.c \
16 version.c \
17 hitag2.c \
18 usb.c
19
20 # These are to be compiled in ARM mode
21 ARMSRC = iso14443.c \
22 iso14443a.c \
23 fpgaloader.c
24
25 # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
26 include ../common/Makefile.common
27
28 all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
29
30 $(OBJDIR)/fpga.o: fpga.bit
31 $(OBJCOPY) -O elf32-littlearm -I binary -B arm --redefine-sym _binary____fpga_fpga_bit_start=_binary_fpga_bit_start --redefine-sym _binary____fpga_fpga_bit_end=_binary_fpga_bit_end --prefix-sections=fpga_bit $^ $@
32
33 $(OBJDIR)/fullimage.elf: $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a
34 $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
35
36 $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf
37 $(OBJCOPY) -F elf32-littlearm --only-section fpgaimage $^ $@
38
39 $(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf
40 $(OBJCOPY) -F elf32-littlearm --remove-section fpgaimage $^ $@
41
42 clean:
43 $(DELETE) $(OBJDIR)$(PATHSEP)*.o
44 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf
45 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19
46 $(DELETE) $(OBJDIR)$(PATHSEP)*.map
47 $(DELETE) $(OBJDIR)$(PATHSEP)*.d
48 $(DELETE) version.c
49
50 .PHONY: all clean help
51 help:
52 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)
53 @echo Possible targets:
54 @echo + all - Make both:
55 @echo + $(OBJDIR)/osimage.s19 - The OS image
56 @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image
57 @echo + clean - Clean $(OBJDIR)
58
Impressum, Datenschutz