Whamcloud - gitweb
LU-14793 hsm: record index for further HSM action scanning
[fs/lustre-release.git] / build / Rules.in
1 # Directories building kernel modules should have two files:
2 #
3 # Makefile.in:
4 #
5 # MODULES := <module-name>
6 # <module-name>-objs := file1.o file2.o file3.o
7 # @INCLUDE_RULES@
8 #
9 # and autoMakefile.am:
10 #
11 # if MODULES
12 # modulefs_DATA = <module-name>$(KMODEXT)
13 # endif
14 #
15 # DIST_SOURCES = $(<module-name>-objs:.o=.c) <other sources>
16 # MOSTLYCLEANFILES = *.o *.ko *.mod.c
17
18 ifeq ($(PATCHLEVEL),)
19
20 include autoMakefile
21
22 fix-kext-ownership:
23         @if test -d $(DESTDIR)$(kextdir) ; then \
24                 echo chown -R root:wheel $(DESTDIR)$(kextdir) ; \
25                 chown -R root:wheel $(DESTDIR)$(kextdir) || \
26                         echo >&2 "*** WARNING: Could not fix kext ownership for $(DESTDIR)$(kextdir)" ; \
27         fi
28
29 else
30
31 include @LINUX_CONFIG@
32
33 EXTRA_CFLAGS := $(EXTRA_PRE_CFLAGS)
34 EXTRA_CFLAGS += @EXTRA_KCFLAGS@ @CFLAGS@
35 EXTRA_CFLAGS += $(EXTRA_POST_CFLAGS)
36
37 KBUILD_EXTRA_SYMBOLS += @EXTRA_SYMBOLS@
38
39 obj-m += $(patsubst %,%.o,$(MODULES))
40
41 endif # PATCHLEVEL