1 # CORTEX-A53 PERI DRIVER CODE
2 # VERSION 2.0
3 # ATHUOR www.hqyj.com
4 # MODIFY DATE
5 # 2019.04.12 Makefile
6 # SHELL=C:/Windows/System32/cmd.exe
7 CROSS_COMPILE = arm-none-linux-gnueabi-
8 NAME = interface
9 #===========================================================================
10 CFLAGS += -g -Wall -O0 -mabi=apcs-gnu -mfpu=neon -mfloat-abi=softfp -fno-bui
11 -nostdinc -I./common/include
12 LD = $(CROSS_COMPILE)ld
13 CC = $(CROSS_COMPILE)gcc
14 NM = $(CROSS_COMPILE)nm
15 OBJCOPY = $(CROSS_COMPILE)objcopy
16 OBJDUMP = $(CROSS_COMPILE)objdump
17 #===========================================================================
18 OBJSss := $(wildcard start/*.S) $(wildcard common/src/*.S) $(wildcard *.S)\
19 $(wildcard start/*.c) $(wildcard common/src/*.c) \
20 $(wildcard src/*.c) $(wildcard *.c)
21 OBJSs := $(patsubst %.S,%.o,$(OBJSss))
22 OBJS := $(patsubst %.c,%.o,$(OBJSs))
23
24 %.o: %.S
25 @echo " AS $@"
26 @$(CC) $(CFLAGS) -c -o $@ $<
27 %.o: %.c
28 @echo " CC $@"
29 @$(CC) $(CFLAGS) -c -o $@ $<
30 all:clean $(OBJS)
31 @echo " LD Linking $(NAME).elf"
32 @$(LD) $(OBJS) -T map.lds -o $(NAME).elf
33 @echo " OBJCOPY Objcopying $(NAME).bin"
34 @$(OBJCOPY) -O binary $(NAME).elf $(NAME).bin
35 @echo " MAP Generating $(NAME).map"
36 @$(NM) $(NAME).elf > $(NAME).map
37 @echo " OBJDUMP Objdumping $(NAME).dis"
38 @$(OBJDUMP) -DS $(NAME).elf > $(NAME).dis
39
40 distclean clean:
41 @rm -rf $(OBJS) *.elf *.bin *.dis *.map
42 @echo " CLEAN complete."
43
44 install:
45 @共享目录的位置,使用make install 自动将当前目录下所有.bin文件拷贝至指定
46 cp $(NAME).bin /home/topeet/ShareFolder/