Whamcloud - gitweb
Changed quotes for newer bash
[fs/lustre-release.git] / lustre / 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 LIBLUSTRE
12 # <liblustre rules>
13 # endif
14 #
15 # if MODULES
16 # modulefs_DATA = <module-name>$(KMODEXT)
17 # endif
18 #
19 # DIST_SOURCES = $(<module-name>-objs:.o=.c) <other sources>
20 # MOSTLYCLEANFILES = *.o *.ko *.mod.c
21
22 ifeq ($(PATCHLEVEL),)
23
24 include autoMakefile
25
26 else
27
28 include @LINUX_CONFIG@
29
30 EXTRA_CFLAGS := $(EXTRA_PRE_CFLAGS)
31 EXTRA_CFLAGS += @EXTRA_KCFLAGS@ @UML_CFLAGS@
32 EXTRA_CFLAGS += $(EXTRA_POST_CFLAGS)
33
34 obj-m := $(patsubst %,%.o,$(MODULES))
35
36 ifeq ($(PATCHLEVEL),4)
37 # 2.4 rules
38 O_TARGET := $(firstword $(obj-m))
39 obj-y := $($(firstword $(MODULES))-objs)
40 export-objs := $(obj-y) $(filter-out $(O_TARGET),$(obj-m))
41 include $(TOPDIR)/Rules.make
42 $(MODINCL)/%.ver: %.c
43         @true
44 endif # PATCHLEVEL
45
46 endif # KERNELRELEASE