其他分享
首页 > 其他分享> > kernel Makefile srctree变量的含义

kernel Makefile srctree变量的含义

作者:互联网

# Use make M=dir to specify directory of external module to build
# Old syntax make ... SUBDIRS=$PWD is still supported
# Setting the environment variable KBUILD_EXTMOD take precedence
ifdef SUBDIRS
  KBUILD_EXTMOD ?= $(SUBDIRS)
endif

ifeq ("$(origin M)", "command line")
  KBUILD_EXTMOD := $(M)
endif

ifeq ($(KBUILD_SRC),)
        # building in the source tree
        srctree := .
else
        ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
                # building in a subdirectory of the source tree
                srctree := ..
        else
                srctree := $(KBUILD_SRC)
        endif
endif

标签:kernel,ifeq,SRC,Makefile,SUBDIRS,KBUILD,endif,srctree
来源: https://blog.csdn.net/contiune/article/details/120205855