]>
Commit | Line | Data |
---|---|---|
7e931bbd | 1 | # Makefile for armsrc, see ../common/Makefile.common for common settings\r |
6658905f | 2 | \r |
7e931bbd | 3 | APP_INCLUDES = apps.h\r |
6658905f | 4 | \r |
d3ae0de7 | 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 | |
c0d04e95 | 7 | APP_CFLAGS = -O6 -DWITH_LF -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b\r |
8 | #-DWITH_LCD \r | |
6658905f | 9 | \r |
d3ae0de7 | 10 | #SRC_LCD = fonts.c LCD.c\r |
c0d04e95 | 11 | SRC_LF = lfops.c hitag2.c\r |
d3ae0de7 | 12 | SRC_ISO15693 = iso15693.c\r |
13 | SRC_ISO14443a = iso14443a.c\r | |
14 | SRC_ISO14443b = iso14443.c\r | |
0fc0fca5 | 15 | \r |
e73e7172 | 16 | THUMBSRC = start.c \\r |
d3ae0de7 | 17 | $(SRC_LCD) \\r |
18 | $(SRC_ISO15693) \\r | |
c0d04e95 | 19 | $(SRC_LF) \\r |
6f5cb60c | 20 | appmain.c printf.c \\r |
0fc0fca5 | 21 | util.c \\r |
22 | usb.c\r | |
23 | \r | |
24 | # These are to be compiled in ARM mode\r | |
d3ae0de7 | 25 | ARMSRC = fpgaloader.c \\r |
aac23b24 | 26 | legicrf.c \\r |
7fe9b0b7 | 27 | iso14443crc.c \\r |
28 | crc16.c \\r | |
d3ae0de7 | 29 | $(SRC_ISO14443a) \\r |
68d9d60a | 30 | $(SRC_ISO14443b) \\r |
8e220a91 | 31 | legic_prng.c \\r |
68d9d60a | 32 | crc.c\r |
aa4d9d9b | 33 | \r |
5e174a51 | 34 | # stdint.h provided locally until GCC 4.5 becomes C99 compliant\r |
35 | APP_CFLAGS += -I.\r | |
36 | \r | |
e73e7172 | 37 | # Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC\r |
0fc0fca5 | 38 | include ../common/Makefile.common\r |
6658905f | 39 | \r |
7e931bbd | 40 | all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19\r |
6658905f | 41 | \r |
e73e7172 | 42 | $(OBJDIR)/fpga.o: fpga.bit\r |
43 | $(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 | 44 | \r |
d5be6f7c | 45 | $(OBJDIR)/fullimage.elf: $(VERSIONOBJ) $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(LIBGCC)\r |
7e931bbd | 46 | $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^\r |
6658905f | 47 | \r |
e73e7172 | 48 | $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf\r |
4271e82d | 49 | $(OBJCOPY) -F elf32-littlearm --only-section .fpgaimage $^ $@ \r |
e73e7172 | 50 | \r |
51 | $(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf\r | |
4271e82d | 52 | $(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@\r |
e73e7172 | 53 | \r |
6658905f | 54 | clean:\r |
7e931bbd | 55 | $(DELETE) $(OBJDIR)$(PATHSEP)*.o\r |
56 | $(DELETE) $(OBJDIR)$(PATHSEP)*.elf\r | |
57 | $(DELETE) $(OBJDIR)$(PATHSEP)*.s19\r | |
58 | $(DELETE) $(OBJDIR)$(PATHSEP)*.map\r | |
0fc0fca5 | 59 | $(DELETE) $(OBJDIR)$(PATHSEP)*.d\r |
8a6aec16 | 60 | $(DELETE) version.c\r |
7e931bbd | 61 | \r |
62 | .PHONY: all clean help\r | |
63 | help:\r | |
64 | @echo Multi-OS Makefile, you are running on $(DETECTED_OS)\r | |
65 | @echo Possible targets:\r | |
8652988d | 66 | @echo + all - Make both:\r |
67 | @echo + $(OBJDIR)/osimage.s19 - The OS image\r | |
68 | @echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image\r | |
69 | @echo + clean - Clean $(OBJDIR)\r | |
0fc0fca5 | 70 | \r |