]> git.zerfleddert.de Git - proxmark3-svn/blob - armsrc/Makefile
Add Makefile for fpga directory (Windows codepath is untested, in any case, go.bat...
[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 usb.c
17
18 # These are to be compiled in ARM mode
19 ARMSRC = iso14443.c \
20 iso14443a.c \
21 fpgaloader.c
22
23 # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
24 include ../common/Makefile.common
25
26 all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
27
28 $(OBJDIR)/fpga.o: fpga.bit
29 $(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 $^ $@
30
31 $(OBJDIR)/fullimage.elf: $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a
32 $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
33
34 $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf
35 $(OBJCOPY) -F elf32-littlearm --only-section fpgaimage $^ $@
36
37 $(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf
38 $(OBJCOPY) -F elf32-littlearm --remove-section fpgaimage $^ $@
39
40 clean:
41 $(DELETE) $(OBJDIR)$(PATHSEP)*.o
42 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf
43 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19
44 $(DELETE) $(OBJDIR)$(PATHSEP)*.map
45 $(DELETE) $(OBJDIR)$(PATHSEP)*.d
46
47 .PHONY: all clean help
48 help:
49 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)
50 @echo Possible targets:
51 @echo + all - Make both:
52 @echo + $(OBJDIR)/osimage.s19 - The OS image
53 @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image
54 @echo + clean - Clean $(OBJDIR)
55
Impressum, Datenschutz