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