]>
Commit | Line | Data |
---|---|---|
1 | # Makefile for armsrc, see ../common/Makefile.common for common settings\r | |
2 | \r | |
3 | APP_INCLUDES = apps.h\r | |
4 | \r | |
5 | # Add the "-DWITH_LCD" flag in APP_CLFAGS to add support for LCD\r | |
6 | # and add SRC_LCD to THUMBSRC\r | |
7 | APP_CFLAGS = -O6\r | |
8 | \r | |
9 | SRC_LCD = fonts.c LCD.c\r | |
10 | \r | |
11 | THUMBSRC = start.c \\r | |
12 | appmain.c \\r | |
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 | |
19 | ARMSRC = iso14443.c \\r | |
20 | iso14443a.c \\r | |
21 | fpgaloader.c\r | |
22 | \r | |
23 | # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC\r | |
24 | include ../common/Makefile.common\r | |
25 | \r | |
26 | all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19\r | |
27 | \r | |
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 | |
30 | \r | |
31 | $(OBJDIR)/fullimage.elf: $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a\r | |
32 | $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r | |
33 | \r | |
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 | |
40 | clean:\r | |
41 | $(DELETE) $(OBJDIR)$(PATHSEP)*.o\r | |
42 | $(DELETE) $(OBJDIR)$(PATHSEP)*.elf\r | |
43 | $(DELETE) $(OBJDIR)$(PATHSEP)*.s19\r | |
44 | $(DELETE) $(OBJDIR)$(PATHSEP)*.map\r | |
45 | $(DELETE) $(OBJDIR)$(PATHSEP)*.d\r | |
46 | \r | |
47 | .PHONY: all clean help\r | |
48 | help:\r | |
49 | @echo Multi-OS Makefile, you are running on $(DETECTED_OS)\r | |
50 | @echo Possible targets:\r | |
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 | |
55 | \r |