Whamcloud - gitweb
add autoconf dirs to build
[fs/lustre-release.git] / build / Makefile
1 #
2 # There are three ways this Makefile can be called:
3 #
4
5 # 1.  As a subdirectory from the toplevel, for automake
6 #
7 # 2. A wrapper around the kernel's makefile when building modules, to
8 #    possibly override the .config file
9 #
10 # 3.  At configure time, as the toplevel module dir for building
11 #     kernel tests
12 #
13
14 ifeq ($(PATCHLEVEL),)
15
16 ifeq ($(LUSTRE_LINUX_CONFIG),)
17
18 # case #1
19 include autoMakefile
20
21 else
22
23 # case #2
24 include $(LUSTRE_LINUX_CONFIG)
25 include Makefile
26
27 endif # LUSTRE_LINUX_CONFIG
28
29 else # PATCHLEVEL
30
31 # case 3
32
33 ifneq ($(LUSTRE_KERNEL_TEST),)
34 ifeq ($(PATCHLEVEL),4)
35 all: $(LUSTRE_KERNEL_TEST)
36 else
37 extra-y = $(LUSTRE_KERNEL_TEST)
38 endif
39 endif
40
41 obj-m := conftest.o
42
43 ifeq ($(PATCHLEVEL),4)
44 include $(TOPDIR)/Rules.make
45 endif
46
47 endif # PATCHLEVEL