]>
Commit | Line | Data |
---|---|---|
6658905f | 1 | CC = arm-elf-gcc\r |
2 | AS = arm-elf-as\r | |
3 | LD = arm-elf-ld\r | |
4 | OBJCOPY = arm-elf-objcopy\r | |
5 | \r | |
6 | OBJDIR = obj\r | |
7 | \r | |
8 | INCLUDE = -I../include\r | |
9 | \r | |
10 | INCLUDES = ../include/proxmark3.h ../include/at91sam7s128.h ../include/config_gpio.h ../include/usb_cmd.h apps.h\r | |
11 | LIB = "..\..\devkitARM\lib\gcc\arm-elf\4.1.0\interwork"\r | |
12 | \r | |
13 | CFLAGS = -O6 -c $(INCLUDE) -Wall\r | |
14 | \r | |
15 | OBJ = $(OBJDIR)/start.o \\r | |
16 | $(OBJDIR)/appmain.o \\r | |
17 | $(OBJDIR)/fpga.o \\r | |
18 | $(OBJDIR)/iso14443.o \\r | |
19 | $(OBJDIR)/iso14443a.o \\r | |
20 | $(OBJDIR)/iso15693.o \\r | |
21 | $(OBJDIR)/util.o \\r | |
22 | $(OBJDIR)/fonts.o \\r | |
23 | $(OBJDIR)/LCD.o\r | |
24 | \r | |
25 | OBJFPGA = \\r | |
26 | $(OBJDIR)/fpgaimg.o\r | |
27 | \r | |
28 | OBJCOMMON = \\r | |
29 | $(OBJDIR)/usb.o\r | |
30 | \r | |
31 | all: osimage.s19\r | |
32 | \r | |
33 | $(OBJDIR)/fpgaimage.s19: $(OBJDIR)/fpgaimg.o\r | |
34 | @echo obj/fpgaimage.s19\r | |
35 | @$(LD) -g -Tldscript-fpga -o $(OBJDIR)\fpgaimage.elf $(OBJDIR)/fpgaimg.o\r | |
36 | @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)\fpgaimage.elf $(OBJDIR)\fpgaimage.s19\r | |
37 | \r | |
38 | $(OBJDIR)/osimage.s19: $(OBJ) $(OBJCOMMON)\r | |
39 | @echo obj/osimage.s19\r | |
40 | @$(LD) -g -Tldscript -o $(OBJDIR)\osimage.elf $(OBJ) $(OBJCOMMON) $(LIB)\libgcc.a\r | |
41 | @$(OBJCOPY) -Osrec --srec-forceS3 $(OBJDIR)\osimage.elf $(OBJDIR)\osimage.s19\r | |
42 | \r | |
43 | osimage.s19: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19\r | |
44 | @echo osimage.s19\r | |
45 | \r | |
46 | $(OBJ): $(@B).c $(INCLUDES)\r | |
47 | @echo $(@B).c\r | |
48 | @$(CC) $(CFLAGS) -mthumb -mthumb-interwork $(@B).c -o $(OBJDIR)/$(@B).o\r | |
49 | \r | |
50 | $(OBJCOMMON): ../common/$(@B).c $(INCLUDES)\r | |
51 | @echo $(@B).c\r | |
52 | @$(CC) $(CFLAGS) -mthumb -mthumb-interwork ../common/$(@B).c -o $(OBJDIR)/$(@B).o\r | |
53 | \r | |
54 | $(OBJFPGA): $(@B).c $(INCLUDES)\r | |
55 | @echo $(@B).c\r | |
56 | @$(CC) $(CFLAGS) -mthumb -mthumb-interwork $(@B).c -o $(OBJDIR)/$(@B).o\r | |
57 | \r | |
58 | clean:\r | |
59 | del /q obj\*.o\r | |
60 | del /q obj\*.elf\r | |
61 | del /q obj\*.s19\r |