Whamcloud - gitweb
LU-14535 quota: get all quota info in LFS
[fs/lustre-release.git] / build / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2
3 #
4 # This file is part of Lustre, http://www.lustre.org/
5 #
6 # build/Makefile
7 #
8 # There are four ways this Makefile can be called:
9 #
10 # 1.  As a subdirectory from the toplevel, for automake
11 # 2.  A wrapper around the kernel's makefile when building modules, to
12 #     possibly override the .config file
13 # 3.  At configure time, as the toplevel module dir for building
14 #     kernel tests
15 #
16
17 ifeq ($(PATCHLEVEL),)
18
19 ifeq ($(LUSTRE_LINUX_CONFIG),)
20
21 # case #1
22 include autoMakefile
23
24 else
25
26 # case #2
27 # Note that this comes from make -C $LINUX -f $LUSTRE/build/Makefile
28 # so "include Makefile" below includes $LINUX/Makefile, not this file
29 include $(LUSTRE_LINUX_CONFIG)
30 include Makefile
31 ifeq ($(DEQUOTE_CC_VERSION_TEXT),yes)
32 CONFIG_CC_VERSION_TEXT=$(shell echo ${CONFIG_CC_VERSION_TEXT:1:-1})
33 endif
34
35 endif # LUSTRE_LINUX_CONFIG
36
37 else # PATCHLEVEL
38 ifeq ($(DEQUOTE_CC_VERSION_TEXT),yes)
39 CONFIG_CC_VERSION_TEXT=$(shell echo ${CONFIG_CC_VERSION_TEXT:1:-1})
40 endif
41
42 # case #3
43 ifneq ($(LUSTRE_KERNEL_TEST),)
44 # extra-y works prior to 5.10
45 extra-y = $(LUSTRE_KERNEL_TEST)
46 # always-y works since 5.6
47 always-y = $(LUSTRE_KERNEL_TEST)
48 # always works for SUSE SP3 LTSS kernel
49 always = $(LUSTRE_KERNEL_TEST)
50 endif
51
52 obj-m := conftest.o
53
54 endif # PATCHLEVEL