]>
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 | #remove one of the following defines and comment out the relevant line\r | |
6 | #in the next section to remove that particular feature from compilation \r | |
7 | APP_CFLAGS = -O6 -DWITH_LF -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b\r | |
8 | #-DWITH_LCD \r | |
9 | \r | |
10 | #SRC_LCD = fonts.c LCD.c\r | |
11 | SRC_LF = lfops.c hitag2.c\r | |
12 | SRC_ISO15693 = iso15693.c\r | |
13 | SRC_ISO14443a = iso14443a.c\r | |
14 | SRC_ISO14443b = iso14443.c\r | |
15 | \r | |
16 | THUMBSRC = start.c \\r | |
17 | $(SRC_LCD) \\r | |
18 | $(SRC_ISO15693) \\r | |
19 | $(SRC_LF) \\r | |
20 | appmain.c \\r | |
21 | util.c \\r | |
22 | usb.c\r | |
23 | \r | |
24 | # These are to be compiled in ARM mode\r | |
25 | ARMSRC = fpgaloader.c \\r | |
26 | legicrf.c \\r | |
27 | $(SRC_ISO14443a) \\r | |
28 | $(SRC_ISO14443b) \\r | |
29 | crc.c\r | |
30 | \r | |
31 | # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC\r | |
32 | include ../common/Makefile.common\r | |
33 | \r | |
34 | all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19\r | |
35 | \r | |
36 | $(OBJDIR)/fpga.o: fpga.bit\r | |
37 | $(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 | |
38 | \r | |
39 | $(OBJDIR)/fullimage.elf: $(VERSIONOBJ) $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a\r | |
40 | $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r | |
41 | \r | |
42 | $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf\r | |
43 | $(OBJCOPY) -F elf32-littlearm --only-section .fpgaimage $^ $@ \r | |
44 | \r | |
45 | $(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf\r | |
46 | $(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@\r | |
47 | \r | |
48 | clean:\r | |
49 | $(DELETE) $(OBJDIR)$(PATHSEP)*.o\r | |
50 | $(DELETE) $(OBJDIR)$(PATHSEP)*.elf\r | |
51 | $(DELETE) $(OBJDIR)$(PATHSEP)*.s19\r | |
52 | $(DELETE) $(OBJDIR)$(PATHSEP)*.map\r | |
53 | $(DELETE) $(OBJDIR)$(PATHSEP)*.d\r | |
54 | $(DELETE) version.c\r | |
55 | \r | |
56 | .PHONY: all clean help\r | |
57 | help:\r | |
58 | @echo Multi-OS Makefile, you are running on $(DETECTED_OS)\r | |
59 | @echo Possible targets:\r | |
60 | @echo + all - Make both:\r | |
61 | @echo + $(OBJDIR)/osimage.s19 - The OS image\r | |
62 | @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image\r | |
63 | @echo + clean - Clean $(OBJDIR)\r | |
64 | \r |