11da177e4SLinus Torvalds# 21da177e4SLinus Torvalds# Makefile for the kernel software RAID and LVM drivers. 31da177e4SLinus Torvalds# 41da177e4SLinus Torvalds 51da177e4SLinus Torvaldsdm-mod-objs := dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \ 61da177e4SLinus Torvalds dm-ioctl.o dm-io.o kcopyd.o 71da177e4SLinus Torvaldsdm-multipath-objs := dm-hw-handler.o dm-path-selector.o dm-mpath.o 81da177e4SLinus Torvaldsdm-snapshot-objs := dm-snap.o dm-exception-store.o 91da177e4SLinus Torvaldsdm-mirror-objs := dm-log.o dm-raid1.o 10*32a7627cSNeilBrownmd-mod-objs := md.o bitmap.o 111da177e4SLinus Torvaldsraid6-objs := raid6main.o raid6algos.o raid6recov.o raid6tables.o \ 121da177e4SLinus Torvalds raid6int1.o raid6int2.o raid6int4.o \ 131da177e4SLinus Torvalds raid6int8.o raid6int16.o raid6int32.o \ 141da177e4SLinus Torvalds raid6altivec1.o raid6altivec2.o raid6altivec4.o \ 151da177e4SLinus Torvalds raid6altivec8.o \ 161da177e4SLinus Torvalds raid6mmx.o raid6sse1.o raid6sse2.o 171da177e4SLinus Torvaldshostprogs-y := mktables 181da177e4SLinus Torvalds 191da177e4SLinus Torvalds# Note: link order is important. All raid personalities 201da177e4SLinus Torvalds# and xor.o must come before md.o, as they each initialise 211da177e4SLinus Torvalds# themselves, and md.o may use the personalities when it 221da177e4SLinus Torvalds# auto-initialised. 231da177e4SLinus Torvalds 241da177e4SLinus Torvaldsobj-$(CONFIG_MD_LINEAR) += linear.o 251da177e4SLinus Torvaldsobj-$(CONFIG_MD_RAID0) += raid0.o 261da177e4SLinus Torvaldsobj-$(CONFIG_MD_RAID1) += raid1.o 271da177e4SLinus Torvaldsobj-$(CONFIG_MD_RAID10) += raid10.o 281da177e4SLinus Torvaldsobj-$(CONFIG_MD_RAID5) += raid5.o xor.o 291da177e4SLinus Torvaldsobj-$(CONFIG_MD_RAID6) += raid6.o xor.o 301da177e4SLinus Torvaldsobj-$(CONFIG_MD_MULTIPATH) += multipath.o 311da177e4SLinus Torvaldsobj-$(CONFIG_MD_FAULTY) += faulty.o 32*32a7627cSNeilBrownobj-$(CONFIG_BLK_DEV_MD) += md-mod.o 331da177e4SLinus Torvaldsobj-$(CONFIG_BLK_DEV_DM) += dm-mod.o 341da177e4SLinus Torvaldsobj-$(CONFIG_DM_CRYPT) += dm-crypt.o 351da177e4SLinus Torvaldsobj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o 361da177e4SLinus Torvaldsobj-$(CONFIG_DM_MULTIPATH_EMC) += dm-emc.o 371da177e4SLinus Torvaldsobj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o 381da177e4SLinus Torvaldsobj-$(CONFIG_DM_MIRROR) += dm-mirror.o 391da177e4SLinus Torvaldsobj-$(CONFIG_DM_ZERO) += dm-zero.o 401da177e4SLinus Torvalds 411da177e4SLinus Torvaldsquiet_cmd_unroll = UNROLL $@ 421da177e4SLinus Torvalds cmd_unroll = $(PERL) $(srctree)/$(src)/unroll.pl $(UNROLL) \ 431da177e4SLinus Torvalds < $< > $@ || ( rm -f $@ && exit 1 ) 441da177e4SLinus Torvalds 451da177e4SLinus Torvaldsifeq ($(CONFIG_ALTIVEC),y) 461da177e4SLinus Torvaldsaltivec_flags := -maltivec -mabi=altivec 471da177e4SLinus Torvaldsendif 481da177e4SLinus Torvalds 491da177e4SLinus Torvaldstargets += raid6int1.c 501da177e4SLinus Torvalds$(obj)/raid6int1.c: UNROLL := 1 511da177e4SLinus Torvalds$(obj)/raid6int1.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE 521da177e4SLinus Torvalds $(call if_changed,unroll) 531da177e4SLinus Torvalds 541da177e4SLinus Torvaldstargets += raid6int2.c 551da177e4SLinus Torvalds$(obj)/raid6int2.c: UNROLL := 2 561da177e4SLinus Torvalds$(obj)/raid6int2.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE 571da177e4SLinus Torvalds $(call if_changed,unroll) 581da177e4SLinus Torvalds 591da177e4SLinus Torvaldstargets += raid6int4.c 601da177e4SLinus Torvalds$(obj)/raid6int4.c: UNROLL := 4 611da177e4SLinus Torvalds$(obj)/raid6int4.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE 621da177e4SLinus Torvalds $(call if_changed,unroll) 631da177e4SLinus Torvalds 641da177e4SLinus Torvaldstargets += raid6int8.c 651da177e4SLinus Torvalds$(obj)/raid6int8.c: UNROLL := 8 661da177e4SLinus Torvalds$(obj)/raid6int8.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE 671da177e4SLinus Torvalds $(call if_changed,unroll) 681da177e4SLinus Torvalds 691da177e4SLinus Torvaldstargets += raid6int16.c 701da177e4SLinus Torvalds$(obj)/raid6int16.c: UNROLL := 16 711da177e4SLinus Torvalds$(obj)/raid6int16.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE 721da177e4SLinus Torvalds $(call if_changed,unroll) 731da177e4SLinus Torvalds 741da177e4SLinus Torvaldstargets += raid6int32.c 751da177e4SLinus Torvalds$(obj)/raid6int32.c: UNROLL := 32 761da177e4SLinus Torvalds$(obj)/raid6int32.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE 771da177e4SLinus Torvalds $(call if_changed,unroll) 781da177e4SLinus Torvalds 791da177e4SLinus TorvaldsCFLAGS_raid6altivec1.o += $(altivec_flags) 801da177e4SLinus Torvaldstargets += raid6altivec1.c 811da177e4SLinus Torvalds$(obj)/raid6altivec1.c: UNROLL := 1 821da177e4SLinus Torvalds$(obj)/raid6altivec1.c: $(src)/raid6altivec.uc $(src)/unroll.pl FORCE 831da177e4SLinus Torvalds $(call if_changed,unroll) 841da177e4SLinus Torvalds 851da177e4SLinus TorvaldsCFLAGS_raid6altivec2.o += $(altivec_flags) 861da177e4SLinus Torvaldstargets += raid6altivec2.c 871da177e4SLinus Torvalds$(obj)/raid6altivec2.c: UNROLL := 2 881da177e4SLinus Torvalds$(obj)/raid6altivec2.c: $(src)/raid6altivec.uc $(src)/unroll.pl FORCE 891da177e4SLinus Torvalds $(call if_changed,unroll) 901da177e4SLinus Torvalds 911da177e4SLinus TorvaldsCFLAGS_raid6altivec4.o += $(altivec_flags) 921da177e4SLinus Torvaldstargets += raid6altivec4.c 931da177e4SLinus Torvalds$(obj)/raid6altivec4.c: UNROLL := 4 941da177e4SLinus Torvalds$(obj)/raid6altivec4.c: $(src)/raid6altivec.uc $(src)/unroll.pl FORCE 951da177e4SLinus Torvalds $(call if_changed,unroll) 961da177e4SLinus Torvalds 971da177e4SLinus TorvaldsCFLAGS_raid6altivec8.o += $(altivec_flags) 981da177e4SLinus Torvaldstargets += raid6altivec8.c 991da177e4SLinus Torvalds$(obj)/raid6altivec8.c: UNROLL := 8 1001da177e4SLinus Torvalds$(obj)/raid6altivec8.c: $(src)/raid6altivec.uc $(src)/unroll.pl FORCE 1011da177e4SLinus Torvalds $(call if_changed,unroll) 1021da177e4SLinus Torvalds 1031da177e4SLinus Torvaldsquiet_cmd_mktable = TABLE $@ 1041da177e4SLinus Torvalds cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 ) 1051da177e4SLinus Torvalds 1061da177e4SLinus Torvaldstargets += raid6tables.c 1071da177e4SLinus Torvalds$(obj)/raid6tables.c: $(obj)/mktables FORCE 1081da177e4SLinus Torvalds $(call if_changed,mktable) 109