加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
make_nand 2.76 KB
一键复制 编辑 原始数据 按行查看 历史
世玉轩 提交于 2021-06-01 06:38 . init push
#
# (C) Copyright 2017-2018
# Allwinner Technology Co., Ltd. <www.allwinnertech.com>
# wangwei <wangwei@allwinnertech.com>
#
# SPDX-License-Identifier: GPL-2.0+
#
SRCTREE := $(CURDIR)
TOPDIR := $(SRCTREE)
CROSS_COMPILE := $(TOPDIR)/../tools/toolchain/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-
DRIVER_DIR := $(TOPDIR)/drivers/sunxi_flash/nand
export TOPDIR
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
LDR = $(CROSS_COMPILE)ldr
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
export AS LD CC CPP AR NM LDR STRIP OBJCOPY OBJDUMP
CFLGAS = -nostdinc -isystem \
-D__KERNEL__ -D__UBOOT__ \
-Wall -Wstrict-prototypes \
-Wno-format-security -fno-builtin -ffreestanding -fshort-wchar -Os \
-fno-stack-protector -fno-delete-null-pointer-checks \
-fstack-usage -Wno-format-nonliteral \
-Werror=date-time -D__ARM__ \
-Wa,-mimplicit-it=always -mthumb -mthumb-interwork \
-mabi=aapcs-linux -mword-relocations -fno-pic -mno-unaligned-access \
-ffunction-sections -fdata-sections -fno-common \
-ffixed-r9 -msoft-float -pipe -march=armv7-a \
-D__LINUX_ARM_ARCH__=7
INCLUDE = -I$(shell dirname `$(CC) -print-libgcc-file-name`)/include \
-I$(SRCTREE)/include \
-I$(SRCTREE)/arch/arm/include
export CFLGAS INCLUDE
platform=$(shell cat .config | grep "CONFIG_MACH_SUN8IW18=y" | awk -F '=' '{print $$1}')
.PHONY:clean clean_libcomm1 clean_libcomm0
all:libcomm0 libcomm1
libcomm0:clean_libcomm0
ifneq ("$(wildcard $(DRIVER_DIR)/common0/lib-nand)","")
make -C $(DRIVER_DIR)/common0/lib-nand
endif
clean_libcomm0:
ifneq ("$(wildcard $(DRIVER_DIR)/common0/lib-nand)","")
make -k -C $(DRIVER_DIR)/common0/lib-nand clean
endif
ifeq ("$(platform)", "CONFIG_MACH_SUN8IW18")
libcomm1:clean_libcomm1
ifneq ("$(wildcard $(DRIVER_DIR)/common1/lib-nand)","")
make -C $(DRIVER_DIR)/common1/lib-nand
endif
else
libcomm1:clean_libcomm1
ifneq ("$(wildcard $(DRIVER_DIR)/common1/)","")
make -C $(DRIVER_DIR)/common1/lib
endif
endif
libsun8iw7p1:clean_sun8iw7p1
ifneq ("$(wildcard $(DRIVER_DIR)/sun8iw7p1/lib-nand)","")
make -C $(DRIVER_DIR)/sun8iw7p1/lib-nand
endif
ifeq ("$(platform)", "CONFIG_MACH_SUN8IW18")
clean_libcomm1:
ifneq ("$(wildcard $(DRIVER_DIR)/common1/lib-nand)","")
make -k -C $(DRIVER_DIR)/common1/lib-nand clean
endif
else
clean_libcomm1:
ifneq ("$(wildcard $(DRIVER_DIR)/common1/lib)","")
make -k -C $(DRIVER_DIR)/common1/lib clean
endif
endif
clean_sun8iw7p1:
ifneq ("$(wildcard $(DRIVER_DIR)/sun8iw7p1/lib-nand)","")
make -k -C $(DRIVER_DIR)/sun8iw7p1/lib-nand clean
endif
clean: clean_libcomm1 clean_libcomm0 clean_sun8iw7p1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化