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