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