blob: 9f7c184725d7329d25fe35f1a0c3ae701243b753 [file] [log] [blame]
David Woodhousef5e70d02009-07-13 11:35:12 +01001obj-$(CONFIG_RAID6_PQ) += raid6_pq.o
2
Yuanhan Liu4f8c55c2012-11-30 13:10:40 -08003raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \
4 int8.o int16.o int32.o
5
6raid6_pq-$(CONFIG_X86) += recov_ssse3.o recov_avx2.o mmx.o sse1.o sse2.o avx2.o
7raid6_pq-$(CONFIG_ALTIVEC) += altivec1.o altivec2.o altivec4.o altivec8.o
8
David Woodhousef5e70d02009-07-13 11:35:12 +01009hostprogs-y += mktables
10
11quiet_cmd_unroll = UNROLL $@
David Woodhouse2144381d2010-08-09 10:36:44 +010012 cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
David Woodhousef5e70d02009-07-13 11:35:12 +010013 < $< > $@ || ( rm -f $@ && exit 1 )
14
15ifeq ($(CONFIG_ALTIVEC),y)
16altivec_flags := -maltivec -mabi=altivec
17endif
18
David Woodhousecc4589e2010-08-11 00:19:05 +010019targets += int1.c
20$(obj)/int1.c: UNROLL := 1
21$(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010022 $(call if_changed,unroll)
23
David Woodhousecc4589e2010-08-11 00:19:05 +010024targets += int2.c
25$(obj)/int2.c: UNROLL := 2
26$(obj)/int2.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010027 $(call if_changed,unroll)
28
David Woodhousecc4589e2010-08-11 00:19:05 +010029targets += int4.c
30$(obj)/int4.c: UNROLL := 4
31$(obj)/int4.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010032 $(call if_changed,unroll)
33
David Woodhousecc4589e2010-08-11 00:19:05 +010034targets += int8.c
35$(obj)/int8.c: UNROLL := 8
36$(obj)/int8.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010037 $(call if_changed,unroll)
38
David Woodhousecc4589e2010-08-11 00:19:05 +010039targets += int16.c
40$(obj)/int16.c: UNROLL := 16
41$(obj)/int16.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010042 $(call if_changed,unroll)
43
David Woodhousecc4589e2010-08-11 00:19:05 +010044targets += int32.c
45$(obj)/int32.c: UNROLL := 32
46$(obj)/int32.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010047 $(call if_changed,unroll)
48
David Woodhousecc4589e2010-08-11 00:19:05 +010049CFLAGS_altivec1.o += $(altivec_flags)
50targets += altivec1.c
51$(obj)/altivec1.c: UNROLL := 1
52$(obj)/altivec1.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010053 $(call if_changed,unroll)
54
David Woodhousecc4589e2010-08-11 00:19:05 +010055CFLAGS_altivec2.o += $(altivec_flags)
56targets += altivec2.c
57$(obj)/altivec2.c: UNROLL := 2
58$(obj)/altivec2.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010059 $(call if_changed,unroll)
60
David Woodhousecc4589e2010-08-11 00:19:05 +010061CFLAGS_altivec4.o += $(altivec_flags)
62targets += altivec4.c
63$(obj)/altivec4.c: UNROLL := 4
64$(obj)/altivec4.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010065 $(call if_changed,unroll)
66
David Woodhousecc4589e2010-08-11 00:19:05 +010067CFLAGS_altivec8.o += $(altivec_flags)
68targets += altivec8.c
69$(obj)/altivec8.c: UNROLL := 8
70$(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010071 $(call if_changed,unroll)
72
73quiet_cmd_mktable = TABLE $@
74 cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 )
75
David Woodhousecc4589e2010-08-11 00:19:05 +010076targets += tables.c
77$(obj)/tables.c: $(obj)/mktables FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010078 $(call if_changed,mktable)