]> git.zerfleddert.de Git - proxmark3-svn/blob - armsrc/Makefile
Clean up line endings, switch everything to LF instead of CRLF
[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_LF -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b
8 #-DWITH_LCD
9
10 #SRC_LCD = fonts.c LCD.c
11 SRC_LF = lfops.c hitag2.c
12 SRC_ISO15693 = iso15693.c
13 SRC_ISO14443a = iso14443a.c
14 SRC_ISO14443b = iso14443.c
15
16 THUMBSRC = start.c \
17 $(SRC_LCD) \
18 $(SRC_ISO15693) \
19 $(SRC_LF) \
20 appmain.c printf.c \
21 util.c \
22 usb.c
23
24 # These are to be compiled in ARM mode
25 ARMSRC = fpgaloader.c \
26 legicrf.c \
27 iso14443crc.c \
28 crc16.c \
29 $(SRC_ISO14443a) \
30 $(SRC_ISO14443b) \
31 legic_prng.c \
32 crc.c
33
34 # stdint.h provided locally until GCC 4.5 becomes C99 compliant
35 APP_CFLAGS += -I.
36
37 # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
38 include ../common/Makefile.common
39
40 all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
41
42 $(OBJDIR)/fpga.o: fpga.bit
43 $(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 $^ $@
44
45 $(OBJDIR)/fullimage.elf: $(VERSIONOBJ) $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(LIBGCC)
46 $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
47
48 $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf
49 $(OBJCOPY) -F elf32-littlearm --only-section .fpgaimage $^ $@
50
51 $(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf
52 $(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@
53
54 clean:
55 $(DELETE) $(OBJDIR)$(PATHSEP)*.o
56 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf
57 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19
58 $(DELETE) $(OBJDIR)$(PATHSEP)*.map
59 $(DELETE) $(OBJDIR)$(PATHSEP)*.d
60 $(DELETE) version.c
61
62 .PHONY: all clean help
63 help:
64 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)
65 @echo Possible targets:
66 @echo + all - Make both:
67 @echo + $(OBJDIR)/osimage.s19 - The OS image
68 @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image
69 @echo + clean - Clean $(OBJDIR)
70
Impressum, Datenschutz