]> cvs.zerfleddert.de Git - proxmark3-svn/blame - armsrc/Makefile
Add checks in em4x50read to avoid segfaults in case loops go over the GraphTraceLen.
[proxmark3-svn] / armsrc / Makefile
CommitLineData
e6b13a57 1PATH=..\..\devkitARM\bin;%PATH%\r
6658905f 2CC = arm-elf-gcc\r
3AS = arm-elf-as\r
4LD = arm-elf-ld\r
5OBJCOPY = arm-elf-objcopy\r
6\r
7OBJDIR = obj\r
8\r
9INCLUDE = -I../include\r
10\r
11INCLUDES = ../include/proxmark3.h ../include/at91sam7s128.h ../include/config_gpio.h ../include/usb_cmd.h apps.h\r
12LIB = "..\..\devkitARM\lib\gcc\arm-elf\4.1.0\interwork"\r
13\r
aa4d9d9b 14# Add the "-DWITH_LCD" flag in CLFAGS to add support for LCD\r
15# and add OBJLCD to OBJ too\r
6658905f 16CFLAGS = -O6 -c $(INCLUDE) -Wall\r
17\r
aa4d9d9b 18OBJLCD = $(OBJDIR)/fonts.o \\r
19 $(OBJDIR)/LCD.o\r
20\r
6658905f 21OBJ = $(OBJDIR)/start.o \\r
22 $(OBJDIR)/appmain.o \\r
23 $(OBJDIR)/fpga.o \\r
9bea179a 24 $(OBJDIR)/lfops.o \\r
6658905f 25 $(OBJDIR)/iso14443.o \\r
26 $(OBJDIR)/iso14443a.o \\r
27 $(OBJDIR)/iso15693.o \\r
aa4d9d9b 28 $(OBJDIR)/util.o\r
6658905f 29\r
30OBJFPGA = \\r
31 $(OBJDIR)/fpgaimg.o\r
32\r
33OBJCOMMON = \\r
34 $(OBJDIR)/usb.o\r
35\r
36all: osimage.s19\r
37\r
38$(OBJDIR)/fpgaimage.s19: $(OBJDIR)/fpgaimg.o\r
39 @echo obj/fpgaimage.s19\r
0422e2a4 40 @$(LD) -g -Tldscript-fpga -o $(OBJDIR)\fpgaimage.elf -Map=obj/fpgaimage.map $(OBJDIR)/fpgaimg.o\r
6658905f 41 @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)\fpgaimage.elf $(OBJDIR)\fpgaimage.s19\r
42\r
43$(OBJDIR)/osimage.s19: $(OBJ) $(OBJCOMMON)\r
44 @echo obj/osimage.s19\r
0422e2a4 45 @$(LD) -g -Tldscript -o $(OBJDIR)\osimage.elf $(OBJ) $(OBJCOMMON) -Map=obj/osimage.map $(LIB)\libgcc.a\r
6658905f 46 @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)\osimage.elf $(OBJDIR)\osimage.s19\r
47\r
48osimage.s19: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19\r
49 @echo osimage.s19\r
50\r
51$(OBJ): $(@B).c $(INCLUDES)\r
52 @echo $(@B).c\r
53 @$(CC) $(CFLAGS) -mthumb -mthumb-interwork $(@B).c -o $(OBJDIR)/$(@B).o\r
54\r
55$(OBJCOMMON): ../common/$(@B).c $(INCLUDES)\r
56 @echo $(@B).c\r
57 @$(CC) $(CFLAGS) -mthumb -mthumb-interwork ../common/$(@B).c -o $(OBJDIR)/$(@B).o\r
58\r
59$(OBJFPGA): $(@B).c $(INCLUDES)\r
60 @echo $(@B).c\r
61 @$(CC) $(CFLAGS) -mthumb -mthumb-interwork $(@B).c -o $(OBJDIR)/$(@B).o\r
62\r
63clean:\r
64 del /q obj\*.o\r
65 del /q obj\*.elf\r
66 del /q obj\*.s19\r
Impressum, Datenschutz