1f5e70d0fSDavid Woodhouseobj-$(CONFIG_RAID6_PQ) += raid6_pq.o 2f5e70d0fSDavid Woodhouse 34f8c55c5SYuanhan Liuraid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \ 44f8c55c5SYuanhan Liu int8.o int16.o int32.o 54f8c55c5SYuanhan Liu 64f8c55c5SYuanhan Liuraid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o 74f8c55c5SYuanhan Liuraid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o 84f8c55c5SYuanhan Liu 9f5e70d0fSDavid Woodhousehostprogs-y += mktables 10f5e70d0fSDavid Woodhouse 11f5e70d0fSDavid Woodhousequiet_cmd_unroll = UNROLL $@ 122144381dSDavid Woodhouse cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \ 13f5e70d0fSDavid Woodhouse < $< > $@ || ( rm -f $@ && exit 1 ) 14f5e70d0fSDavid Woodhouse 15f5e70d0fSDavid Woodhouseifeq ($(CONFIG_ALTIVEC),y) 16f5e70d0fSDavid Woodhousealtivec_flags := -maltivec -mabi=altivec 17f5e70d0fSDavid Woodhouseendif 18f5e70d0fSDavid Woodhouse 19cc4589ebSDavid Woodhousetargets += int1.c 20cc4589ebSDavid Woodhouse$(obj)/int1.c: UNROLL := 1 21cc4589ebSDavid Woodhouse$(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE 22f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 23f5e70d0fSDavid Woodhouse 24cc4589ebSDavid Woodhousetargets += int2.c 25cc4589ebSDavid Woodhouse$(obj)/int2.c: UNROLL := 2 26cc4589ebSDavid Woodhouse$(obj)/int2.c: $(src)/int.uc $(src)/unroll.awk FORCE 27f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 28f5e70d0fSDavid Woodhouse 29cc4589ebSDavid Woodhousetargets += int4.c 30cc4589ebSDavid Woodhouse$(obj)/int4.c: UNROLL := 4 31cc4589ebSDavid Woodhouse$(obj)/int4.c: $(src)/int.uc $(src)/unroll.awk FORCE 32f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 33f5e70d0fSDavid Woodhouse 34cc4589ebSDavid Woodhousetargets += int8.c 35cc4589ebSDavid Woodhouse$(obj)/int8.c: UNROLL := 8 36cc4589ebSDavid Woodhouse$(obj)/int8.c: $(src)/int.uc $(src)/unroll.awk FORCE 37f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 38f5e70d0fSDavid Woodhouse 39cc4589ebSDavid Woodhousetargets += int16.c 40cc4589ebSDavid Woodhouse$(obj)/int16.c: UNROLL := 16 41cc4589ebSDavid Woodhouse$(obj)/int16.c: $(src)/int.uc $(src)/unroll.awk FORCE 42f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 43f5e70d0fSDavid Woodhouse 44cc4589ebSDavid Woodhousetargets += int32.c 45cc4589ebSDavid Woodhouse$(obj)/int32.c: UNROLL := 32 46cc4589ebSDavid Woodhouse$(obj)/int32.c: $(src)/int.uc $(src)/unroll.awk FORCE 47f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 48f5e70d0fSDavid Woodhouse 49cc4589ebSDavid WoodhouseCFLAGS_altivec1.o += $(altivec_flags) 50cc4589ebSDavid Woodhousetargets += altivec1.c 51cc4589ebSDavid Woodhouse$(obj)/altivec1.c: UNROLL := 1 52cc4589ebSDavid Woodhouse$(obj)/altivec1.c: $(src)/altivec.uc $(src)/unroll.awk FORCE 53f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 54f5e70d0fSDavid Woodhouse 55cc4589ebSDavid WoodhouseCFLAGS_altivec2.o += $(altivec_flags) 56cc4589ebSDavid Woodhousetargets += altivec2.c 57cc4589ebSDavid Woodhouse$(obj)/altivec2.c: UNROLL := 2 58cc4589ebSDavid Woodhouse$(obj)/altivec2.c: $(src)/altivec.uc $(src)/unroll.awk FORCE 59f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 60f5e70d0fSDavid Woodhouse 61cc4589ebSDavid WoodhouseCFLAGS_altivec4.o += $(altivec_flags) 62cc4589ebSDavid Woodhousetargets += altivec4.c 63cc4589ebSDavid Woodhouse$(obj)/altivec4.c: UNROLL := 4 64cc4589ebSDavid Woodhouse$(obj)/altivec4.c: $(src)/altivec.uc $(src)/unroll.awk FORCE 65f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 66f5e70d0fSDavid Woodhouse 67cc4589ebSDavid WoodhouseCFLAGS_altivec8.o += $(altivec_flags) 68cc4589ebSDavid Woodhousetargets += altivec8.c 69cc4589ebSDavid Woodhouse$(obj)/altivec8.c: UNROLL := 8 70cc4589ebSDavid Woodhouse$(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE 71f5e70d0fSDavid Woodhouse $(call if_changed,unroll) 72f5e70d0fSDavid Woodhouse 73f5e70d0fSDavid Woodhousequiet_cmd_mktable = TABLE $@ 74f5e70d0fSDavid Woodhouse cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 ) 75f5e70d0fSDavid Woodhouse 76cc4589ebSDavid Woodhousetargets += tables.c 77cc4589ebSDavid Woodhouse$(obj)/tables.c: $(obj)/mktables FORCE 78f5e70d0fSDavid Woodhouse $(call if_changed,mktable) 79