]> git.zerfleddert.de Git - proxmark3-svn/blame - armsrc/Makefile
Updated the windows Makefile to be compatible with both nmake and make
[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
0fa9ca5b 16 hitag2.c \\r
0fc0fca5 17 usb.c\r
18\r
19# These are to be compiled in ARM mode\r
e73e7172 20ARMSRC = iso14443.c \\r
21 iso14443a.c \\r
22 fpgaloader.c\r
aa4d9d9b 23\r
e73e7172 24# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC\r
0fc0fca5 25include ../common/Makefile.common\r
6658905f 26\r
7e931bbd 27all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19\r
6658905f 28\r
e73e7172 29$(OBJDIR)/fpga.o: fpga.bit\r
30 $(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 31\r
4271e82d 32$(OBJDIR)/fullimage.elf: $(VERSIONOBJ) $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a\r
7e931bbd 33 $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r
6658905f 34\r
e73e7172 35$(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf\r
4271e82d 36 $(OBJCOPY) -F elf32-littlearm --only-section .fpgaimage $^ $@ \r
e73e7172 37\r
38$(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf\r
4271e82d 39 $(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@\r
e73e7172 40\r
6658905f 41clean:\r
7e931bbd 42 $(DELETE) $(OBJDIR)$(PATHSEP)*.o\r
43 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf\r
44 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19\r
45 $(DELETE) $(OBJDIR)$(PATHSEP)*.map\r
0fc0fca5 46 $(DELETE) $(OBJDIR)$(PATHSEP)*.d\r
8a6aec16 47 $(DELETE) version.c\r
7e931bbd 48\r
49.PHONY: all clean help\r
50help:\r
51 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)\r
52 @echo Possible targets:\r
8652988d 53 @echo + all - Make both:\r
54 @echo + $(OBJDIR)/osimage.s19 - The OS image\r
55 @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image\r
56 @echo + clean - Clean $(OBJDIR)\r
0fc0fca5 57\r
Impressum, Datenschutz