-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile.sample
26 lines (21 loc) · 1.1 KB
/
Makefile.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2020 Wang Nan <[email protected]>
# Top makefile of kbuild standalone. This is also a sample makefile
# to show how to use kbuild standalone.
#
# `KBUILD_STANDALONE_SRCDIRS:` source directories of this project.
# `KBUILD_STANDALONE_TARGETS:` targets to build using kbuild standalone.
# `<target>_GOAL:` make goals list passed to `<target>/Makefile`.
# `<target>_CONF:` config of a target, like `need-builtin=1`.
KBUILD_STANDALONE_TARGETS := fixdep kconfig unifdef
KBUILD_STANDALONE_SRCDIRS := $(KBUILD_STANDALONE_TARGETS)
kconfig_GOAL := kconfig/mconf kconfig/conf
# Suggest to use pkg-config to find the location where Makefile.include
# should be found. If it is not found, use internal kbuild.
makefile_include := $(shell pkg-config --variable=makefile_include kbuild-standalone)
ifeq ($(makefile_include),)
kbuild_standalone_path := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))/kbuild
makefile_include := $(kbuild_standalone_path)/Makefile.include
endif
# include Makefile.include to invoke kbuild standalone.
include $(makefile_include)