]> cvs.zerfleddert.de Git - proxmark3-svn/blob - armsrc/Makefile
Move most rules to Makefile.common
[proxmark3-svn] / armsrc / Makefile
1 # Makefile for armsrc, see ../common/Makefile.common for common settings
2
3 APP_INCLUDES = apps.h
4
5 # Add the "-DWITH_LCD" flag in APP_CLFAGS to add support for LCD
6 # and add SRC_LCD to SRC_MAIN
7 APP_CFLAGS = -O6
8
9 SRC_LCD = fonts.c LCD.c
10
11 SRC_MAIN = start.c \
12 appmain.c \
13 fpga.c \
14 lfops.c \
15 iso15693.c \
16 util.c \
17 usb.c
18
19 # These are to be compiled in ARM mode
20 SRC_MAIN_FAST = iso14443.c \
21 iso14443a.c
22
23 SRC_FPGA = fpgaimg.c
24
25 THUMBSRC = $(SRC_MAIN) $(SRC_FPGA)
26 ARMSRC = $(SRC_MAIN_FAST)
27
28 MAIN_OBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(SRC_MAIN) $(SRC_MAIN_FAST))
29
30 # Do not move this inclusion before the definition of {THUMB,ASM,ARM}{OBJ,SRC}
31 include ../common/Makefile.common
32
33 all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
34
35 $(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fpgaimg.o
36 $(LD) -g -Tldscript-fpga -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
37
38 $(OBJDIR)/osimage.elf: $(MAIN_OBJ) $(ARMLIB)/libgcc.a
39 $(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
40
41 clean:
42 $(DELETE) $(OBJDIR)$(PATHSEP)*.o
43 $(DELETE) $(OBJDIR)$(PATHSEP)*.elf
44 $(DELETE) $(OBJDIR)$(PATHSEP)*.s19
45 $(DELETE) $(OBJDIR)$(PATHSEP)*.map
46 $(DELETE) $(OBJDIR)$(PATHSEP)*.d
47
48 .PHONY: all clean help
49 help:
50 @echo Multi-OS Makefile, you are running on $(DETECTED_OS)
51 @echo Possible targets:
52 @echo + all - Make both:
53 @echo + osimage.s19 - The OS image
54 @echo + fpgaimage.s19 - The FPGA image
55 @echo + clean - Clean $(OBJDIR)
56
Impressum, Datenschutz