2009-08-26 19:17:05 +08:00
|
|
|
# Makefile for armsrc, see ../common/Makefile.common for common settings
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-26 19:17:05 +08:00
|
|
|
APP_INCLUDES = apps.h
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-26 19:17:05 +08:00
|
|
|
# Add the "-DWITH_LCD" flag in APP_CLFAGS to add support for LCD
|
2009-08-28 07:29:49 +08:00
|
|
|
# and add SRC_LCD to THUMBSRC
|
2009-08-26 19:17:05 +08:00
|
|
|
APP_CFLAGS = -O6
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-27 01:34:19 +08:00
|
|
|
SRC_LCD = fonts.c LCD.c
|
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
THUMBSRC = start.c \
|
2009-08-27 01:34:19 +08:00
|
|
|
appmain.c \
|
|
|
|
lfops.c \
|
|
|
|
iso15693.c \
|
|
|
|
util.c \
|
2009-08-28 14:40:44 +08:00
|
|
|
version.c \
|
2009-08-27 01:34:19 +08:00
|
|
|
usb.c
|
|
|
|
|
|
|
|
# These are to be compiled in ARM mode
|
2009-08-28 07:29:49 +08:00
|
|
|
ARMSRC = iso14443.c \
|
|
|
|
iso14443a.c \
|
|
|
|
fpgaloader.c
|
2009-04-26 05:19:59 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
|
2009-08-27 01:34:19 +08:00
|
|
|
include ../common/Makefile.common
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-26 19:17:05 +08:00
|
|
|
all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
$(OBJDIR)/fpga.o: fpga.bit
|
|
|
|
$(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 $^ $@
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
$(OBJDIR)/fullimage.elf: $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(ARMLIB)/libgcc.a
|
2009-08-26 19:17:05 +08:00
|
|
|
$(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
$(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf
|
|
|
|
$(OBJCOPY) -F elf32-littlearm --only-section fpgaimage $^ $@
|
|
|
|
|
|
|
|
$(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf
|
|
|
|
$(OBJCOPY) -F elf32-littlearm --remove-section fpgaimage $^ $@
|
|
|
|
|
2009-04-09 14:43:20 +08:00
|
|
|
clean:
|
2009-08-26 19:17:05 +08:00
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.o
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.elf
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.s19
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.map
|
2009-08-27 01:34:19 +08:00
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.d
|
2009-08-28 14:40:44 +08:00
|
|
|
$(DELETE) version.c
|
2009-08-26 19:17:05 +08:00
|
|
|
|
|
|
|
.PHONY: all clean help
|
|
|
|
help:
|
|
|
|
@echo Multi-OS Makefile, you are running on $(DETECTED_OS)
|
|
|
|
@echo Possible targets:
|
2009-08-27 12:25:34 +08:00
|
|
|
@echo + all - Make both:
|
|
|
|
@echo + $(OBJDIR)/osimage.s19 - The OS image
|
|
|
|
@echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image
|
|
|
|
@echo + clean - Clean $(OBJDIR)
|
2009-08-27 01:34:19 +08:00
|
|
|
|