vserver 1.9.5.x5
[linux-2.6.git] / drivers / md / Makefile
1 #
2 # Makefile for the kernel software RAID and LVM drivers.
3 #
4
5 dm-mod-objs     := dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
6                    dm-ioctl.o dm-io.o kcopyd.o
7 dm-snapshot-objs := dm-snap.o dm-exception-store.o
8 dm-mirror-objs  := dm-log.o dm-raid1.o
9 raid6-objs      := raid6main.o raid6algos.o raid6recov.o raid6tables.o \
10                    raid6int1.o raid6int2.o raid6int4.o \
11                    raid6int8.o raid6int16.o raid6int32.o \
12                    raid6altivec1.o raid6altivec2.o raid6altivec4.o \
13                    raid6altivec8.o \
14                    raid6mmx.o raid6sse1.o raid6sse2.o
15 hostprogs-y     := mktables
16
17 # Note: link order is important.  All raid personalities
18 # and xor.o must come before md.o, as they each initialise 
19 # themselves, and md.o may use the personalities when it 
20 # auto-initialised.
21
22 obj-$(CONFIG_MD_LINEAR)         += linear.o
23 obj-$(CONFIG_MD_RAID0)          += raid0.o
24 obj-$(CONFIG_MD_RAID1)          += raid1.o
25 obj-$(CONFIG_MD_RAID10)         += raid10.o
26 obj-$(CONFIG_MD_RAID5)          += raid5.o xor.o
27 obj-$(CONFIG_MD_RAID6)          += raid6.o xor.o
28 obj-$(CONFIG_MD_MULTIPATH)      += multipath.o
29 obj-$(CONFIG_MD_FAULTY)         += faulty.o
30 obj-$(CONFIG_BLK_DEV_MD)        += md.o
31 obj-$(CONFIG_BLK_DEV_DM)        += dm-mod.o
32 obj-$(CONFIG_DM_CRYPT)          += dm-crypt.o
33 obj-$(CONFIG_DM_SNAPSHOT)       += dm-snapshot.o
34 obj-$(CONFIG_DM_MIRROR)         += dm-mirror.o
35 obj-$(CONFIG_DM_ZERO)           += dm-zero.o
36
37 quiet_cmd_unroll = UNROLL  $@
38       cmd_unroll = $(PERL) $(srctree)/$(src)/unroll.pl $(UNROLL) \
39                    < $< > $@ || ( rm -f $@ && exit 1 )
40
41 ifeq ($(CONFIG_ALTIVEC),y)
42 altivec_flags := -maltivec -mabi=altivec
43 endif
44
45 targets += raid6int1.c
46 $(obj)/raid6int1.c:   UNROLL := 1
47 $(obj)/raid6int1.c:   $(src)/raid6int.uc $(src)/unroll.pl FORCE
48         $(call if_changed,unroll)
49
50 targets += raid6int2.c
51 $(obj)/raid6int2.c:   UNROLL := 2
52 $(obj)/raid6int2.c:   $(src)/raid6int.uc $(src)/unroll.pl FORCE
53         $(call if_changed,unroll)
54
55 targets += raid6int4.c
56 $(obj)/raid6int4.c:   UNROLL := 4
57 $(obj)/raid6int4.c:   $(src)/raid6int.uc $(src)/unroll.pl FORCE
58         $(call if_changed,unroll)
59
60 targets += raid6int8.c
61 $(obj)/raid6int8.c:   UNROLL := 8
62 $(obj)/raid6int8.c:   $(src)/raid6int.uc $(src)/unroll.pl FORCE
63         $(call if_changed,unroll)
64
65 targets += raid6int16.c
66 $(obj)/raid6int16.c:  UNROLL := 16
67 $(obj)/raid6int16.c:  $(src)/raid6int.uc $(src)/unroll.pl FORCE
68         $(call if_changed,unroll)
69
70 targets += raid6int32.c
71 $(obj)/raid6int32.c:  UNROLL := 32
72 $(obj)/raid6int32.c:  $(src)/raid6int.uc $(src)/unroll.pl FORCE
73         $(call if_changed,unroll)
74
75 CFLAGS_raid6altivec1.o += $(altivec_flags)
76 targets += raid6altivec1.c
77 $(obj)/raid6altivec1.c:   UNROLL := 1
78 $(obj)/raid6altivec1.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
79         $(call if_changed,unroll)
80
81 CFLAGS_raid6altivec2.o += $(altivec_flags)
82 targets += raid6altivec2.c
83 $(obj)/raid6altivec2.c:   UNROLL := 2
84 $(obj)/raid6altivec2.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
85         $(call if_changed,unroll)
86
87 CFLAGS_raid6altivec4.o += $(altivec_flags)
88 targets += raid6altivec4.c
89 $(obj)/raid6altivec4.c:   UNROLL := 4
90 $(obj)/raid6altivec4.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
91         $(call if_changed,unroll)
92
93 CFLAGS_raid6altivec8.o += $(altivec_flags)
94 targets += raid6altivec8.c
95 $(obj)/raid6altivec8.c:   UNROLL := 8
96 $(obj)/raid6altivec8.c:   $(src)/raid6altivec.uc $(src)/unroll.pl FORCE
97         $(call if_changed,unroll)
98
99 quiet_cmd_mktable = TABLE   $@
100       cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 )
101
102 targets += raid6tables.c
103 $(obj)/raid6tables.c: $(obj)/mktables FORCE
104         $(call if_changed,mktable)