]> git.zerfleddert.de Git - proxmark3-svn/blame - armsrc/Makefile
Add Makefile for fpga directory (Windows codepath is untested, in any case, go.bat...
[proxmark3-svn] / armsrc / Makefile
CommitLineData
7e931bbd 1# Makefile for armsrc, see ../common/Makefile.common for common settings\r
6658905f 2\r
7e931bbd 3APP_INCLUDES = apps.h\r
6658905f 4\r
7e931bbd 5# Add the "-DWITH_LCD" flag in APP_CLFAGS to add support for LCD\r
e73e7172 6# and add SRC_LCD to THUMBSRC\r
7e931bbd 7APP_CFLAGS = -O6\r
6658905f 8\r
0fc0fca5 9SRC_LCD = fonts.c LCD.c\r
10\r
e73e7172 11THUMBSRC = start.c \\r
0fc0fca5 12 appmain.c \\r
0fc0fca5 13 lfops.c \\r
14 iso15693.c \\r
15 util.c \\r
16 usb.c\r
17\r
18# These are to be compiled in ARM mode\r
e73e7172 19ARMSRC = iso14443.c \\r
20 iso14443a.c \\r
21 fpgaloader.c\r
aa4d9d9b 22\r
e73e7172 23# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC\r
0fc0fca5 24include ../common/Makefile.common\r
6658905f 25\r
7e931bbd 26all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19\r
6658905f 27\r
e73e7172 28$(OBJDIR)/fpga.o: fpga.bit\r
29 $(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 $^ $@\r
6658905f 30\r
e73e7172 31$(OBJDIR)/fullimage.elf: $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a\r
7e931bbd 32 $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r
6658905f 33\r
e73e7172 34$(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf\r
35 $(OBJCOPY) -F elf32-littlearm --only-section fpgaimage $^ $@ \r
36\r
37$(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf\r
38 $(OBJCOPY) -F elf32-littlearm --remove-section fpgaimage $^ $@\r
39\r
6658905f 40clean:\r
7e931bbd 41 $(DELETE) $(OBJDIR)$(PATHSEP)*.o\r
42 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf\r
43 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19\r
44 $(DELETE) $(OBJDIR)$(PATHSEP)*.map\r
0fc0fca5 45 $(DELETE) $(OBJDIR)$(PATHSEP)*.d\r
7e931bbd 46\r
47.PHONY: all clean help\r
48help:\r
49 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)\r
50 @echo Possible targets:\r
8652988d 51 @echo + all - Make both:\r
52 @echo + $(OBJDIR)/osimage.s19 - The OS image\r
53 @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image\r
54 @echo + clean - Clean $(OBJDIR)\r
0fc0fca5 55\r
Impressum, Datenschutz