[Mod] 优化顶层变量的传递
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -13,5 +13,7 @@
|
|||||||
|
|
||||||
Module.symvers
|
Module.symvers
|
||||||
modules.order
|
modules.order
|
||||||
|
compile_commands.json
|
||||||
|
|
||||||
|
.cache/
|
||||||
output/
|
output/
|
||||||
21
Makefile
21
Makefile
@ -10,7 +10,11 @@
|
|||||||
# Path information
|
# Path information
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
LOCAL_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
LOCAL_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||||
KERNEL_DIR ?= $(realpath $(LOCAL_DIR)/../../../linux_5.10)
|
|
||||||
|
# SDK directories
|
||||||
|
SDK_TOP ?= $(HOME)/Source/15-SG200x/01-MilkDuo/02-Project/SDK_SG200x_V2.0.0
|
||||||
|
KERNEL_DIR ?= $(SDK_TOP)/linux_5.10/build/sg2000_milkv_duos_glibc_arm64_sd
|
||||||
|
TOOLCHAIN_DIR ?= $(SDK_TOP)/host-tools/gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin
|
||||||
|
|
||||||
# Subdirectory
|
# Subdirectory
|
||||||
|
|
||||||
@ -19,25 +23,32 @@ INSTALL_DIR ?= $(LOCAL_DIR)/__install
|
|||||||
#$(info Output directoty : $(OUTPUT_DIR))
|
#$(info Output directoty : $(OUTPUT_DIR))
|
||||||
#$(info Install directoty: $(INSTALL_DIR))
|
#$(info Install directoty: $(INSTALL_DIR))
|
||||||
|
|
||||||
|
export KERNEL_DIR
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
# Variables
|
# Variables
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
MULTI_CORES ?= $(shell grep -c ^processor /proc/cpuinfo)
|
MULTI_CORES ?= $(shell grep -c ^processor /proc/cpuinfo)
|
||||||
|
|
||||||
SUB_DIRS := spi 01-Debug
|
SUB_DIRS := \
|
||||||
|
spi \
|
||||||
|
01-Debug
|
||||||
|
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
# Compile configure
|
# Compile configure
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
ARCH ?= riscv
|
#ARCH ?= riscv
|
||||||
CROSS_COMPILE ?= riscv64-unknown-linux-musl-
|
#CROSS_COMPILE ?= riscv64-unknown-linux-musl-
|
||||||
|
ARCH ?= arm64
|
||||||
|
CROSS_COMPILE ?= aarch64-linux-gnu-
|
||||||
|
|
||||||
CC := $(CROSS_COMPILE)gcc
|
CC := $(CROSS_COMPILE)gcc
|
||||||
LD := $(CROSS_COMPILE)ld
|
LD := $(CROSS_COMPILE)ld
|
||||||
AR := $(CROSS_COMPILE)ar
|
AR := $(CROSS_COMPILE)ar
|
||||||
STRIP := $(CROSS_COMPILE)strip
|
STRIP := $(CROSS_COMPILE)strip
|
||||||
|
|
||||||
export ARCH CROSS_COMPILE
|
PATH := $(TOOLCHAIN_DIR):$(PATH)
|
||||||
|
|
||||||
|
export ARCH CROSS_COMPILE PATH
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
# Targets
|
# Targets
|
||||||
#*******************************************************************************
|
#*******************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user