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