]> git.zerfleddert.de Git - proxmark3-svn/blob - armsrc/Makefile
d73f2e77bc061c9ecb90083b102e67c97a836592
[proxmark3-svn] / armsrc / Makefile
1 # Makefile for armsrc, see ../common/Makefile.common for common settings
2
3 APP_INCLUDES = apps.h
4
5 #remove one of the following defines and comment out the relevant line
6 #in the next section to remove that particular feature from compilation
7 APP_CFLAGS = -O6 -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b
8 #-DWITH_LCD
9
10 #SRC_LCD = fonts.c LCD.c
11 SRC_ISO15693 = iso15693.c
12 SRC_ISO14443a = iso14443a.c
13 SRC_ISO14443b = iso14443.c
14
15 THUMBSRC = start.c \
16 $(SRC_LCD) \
17 $(SRC_ISO15693) \
18 appmain.c \
19 lfops.c \
20 util.c \
21 hitag2.c \
22 usb.c
23
24 # These are to be compiled in ARM mode
25 ARMSRC = fpgaloader.c \
26 $(SRC_ISO14443a) \
27 $(SRC_ISO14443b)
28
29 # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
30 include ../common/Makefile.common
31
32 all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
33
34 $(OBJDIR)/fpga.o: fpga.bit
35 $(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 $^ $@
36
37 $(OBJDIR)/fullimage.elf: $(VERSIONOBJ) $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a
38 $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
39
40 $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf
41 $(OBJCOPY) -F elf32-littlearm --only-section .fpgaimage $^ $@
42
43 $(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf
44 $(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@
45
46 clean:
47 $(DELETE) $(OBJDIR)$(PATHSEP)*.o
48 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf
49 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19
50 $(DELETE) $(OBJDIR)$(PATHSEP)*.map
51 $(DELETE) $(OBJDIR)$(PATHSEP)*.d
52 $(DELETE) version.c
53
54 .PHONY: all clean help
55 help:
56 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)
57 @echo Possible targets:
58 @echo + all - Make both:
59 @echo + $(OBJDIR)/osimage.s19 - The OS image
60 @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image
61 @echo + clean - Clean $(OBJDIR)
62
Impressum, Datenschutz