David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 1 | obj-$(CONFIG_RAID6_PQ) += raid6_pq.o |
| 2 | |
| 3 | raid6_pq-y += raid6algos.o raid6recov.o raid6tables.o \ |
| 4 | raid6int1.o raid6int2.o raid6int4.o \ |
| 5 | raid6int8.o raid6int16.o raid6int32.o \ |
| 6 | raid6altivec1.o raid6altivec2.o raid6altivec4.o \ |
| 7 | raid6altivec8.o \ |
| 8 | raid6mmx.o raid6sse1.o raid6sse2.o |
| 9 | hostprogs-y += mktables |
| 10 | |
| 11 | quiet_cmd_unroll = UNROLL $@ |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 12 | cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \ |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 13 | < $< > $@ || ( rm -f $@ && exit 1 ) |
| 14 | |
| 15 | ifeq ($(CONFIG_ALTIVEC),y) |
| 16 | altivec_flags := -maltivec -mabi=altivec |
| 17 | endif |
| 18 | |
| 19 | targets += raid6int1.c |
| 20 | $(obj)/raid6int1.c: UNROLL := 1 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 21 | $(obj)/raid6int1.c: $(src)/raid6int.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 22 | $(call if_changed,unroll) |
| 23 | |
| 24 | targets += raid6int2.c |
| 25 | $(obj)/raid6int2.c: UNROLL := 2 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 26 | $(obj)/raid6int2.c: $(src)/raid6int.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 27 | $(call if_changed,unroll) |
| 28 | |
| 29 | targets += raid6int4.c |
| 30 | $(obj)/raid6int4.c: UNROLL := 4 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 31 | $(obj)/raid6int4.c: $(src)/raid6int.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 32 | $(call if_changed,unroll) |
| 33 | |
| 34 | targets += raid6int8.c |
| 35 | $(obj)/raid6int8.c: UNROLL := 8 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 36 | $(obj)/raid6int8.c: $(src)/raid6int.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 37 | $(call if_changed,unroll) |
| 38 | |
| 39 | targets += raid6int16.c |
| 40 | $(obj)/raid6int16.c: UNROLL := 16 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 41 | $(obj)/raid6int16.c: $(src)/raid6int.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 42 | $(call if_changed,unroll) |
| 43 | |
| 44 | targets += raid6int32.c |
| 45 | $(obj)/raid6int32.c: UNROLL := 32 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 46 | $(obj)/raid6int32.c: $(src)/raid6int.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 47 | $(call if_changed,unroll) |
| 48 | |
| 49 | CFLAGS_raid6altivec1.o += $(altivec_flags) |
| 50 | targets += raid6altivec1.c |
| 51 | $(obj)/raid6altivec1.c: UNROLL := 1 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 52 | $(obj)/raid6altivec1.c: $(src)/raid6altivec.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 53 | $(call if_changed,unroll) |
| 54 | |
| 55 | CFLAGS_raid6altivec2.o += $(altivec_flags) |
| 56 | targets += raid6altivec2.c |
| 57 | $(obj)/raid6altivec2.c: UNROLL := 2 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 58 | $(obj)/raid6altivec2.c: $(src)/raid6altivec.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 59 | $(call if_changed,unroll) |
| 60 | |
| 61 | CFLAGS_raid6altivec4.o += $(altivec_flags) |
| 62 | targets += raid6altivec4.c |
| 63 | $(obj)/raid6altivec4.c: UNROLL := 4 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 64 | $(obj)/raid6altivec4.c: $(src)/raid6altivec.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 65 | $(call if_changed,unroll) |
| 66 | |
| 67 | CFLAGS_raid6altivec8.o += $(altivec_flags) |
| 68 | targets += raid6altivec8.c |
| 69 | $(obj)/raid6altivec8.c: UNROLL := 8 |
David Woodhouse | 2144381d | 2010-08-09 10:36:44 +0100 | [diff] [blame^] | 70 | $(obj)/raid6altivec8.c: $(src)/raid6altivec.uc $(src)/unroll.awk FORCE |
David Woodhouse | f5e70d0 | 2009-07-13 11:35:12 +0100 | [diff] [blame] | 71 | $(call if_changed,unroll) |
| 72 | |
| 73 | quiet_cmd_mktable = TABLE $@ |
| 74 | cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 ) |
| 75 | |
| 76 | targets += raid6tables.c |
| 77 | $(obj)/raid6tables.c: $(obj)/mktables FORCE |
| 78 | $(call if_changed,mktable) |