blob: 8a38102770f3cc8eb8360923de14c637ebc165e7 [file] [log] [blame]
David Woodhousef5e70d02009-07-13 11:35:12 +01001obj-$(CONFIG_RAID6_PQ) += raid6_pq.o
2
David Woodhousecc4589e2010-08-11 00:19:05 +01003raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \
4 int8.o int16.o int32.o altivec1.o altivec2.o altivec4.o \
5 altivec8.o mmx.o sse1.o sse2.o
David Woodhousef5e70d02009-07-13 11:35:12 +01006hostprogs-y += mktables
7
8quiet_cmd_unroll = UNROLL $@
David Woodhouse21443812010-08-09 10:36:44 +01009 cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
David Woodhousef5e70d02009-07-13 11:35:12 +010010 < $< > $@ || ( rm -f $@ && exit 1 )
11
12ifeq ($(CONFIG_ALTIVEC),y)
13altivec_flags := -maltivec -mabi=altivec
14endif
15
David Woodhousecc4589e2010-08-11 00:19:05 +010016targets += int1.c
17$(obj)/int1.c: UNROLL := 1
18$(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010019 $(call if_changed,unroll)
20
David Woodhousecc4589e2010-08-11 00:19:05 +010021targets += int2.c
22$(obj)/int2.c: UNROLL := 2
23$(obj)/int2.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010024 $(call if_changed,unroll)
25
David Woodhousecc4589e2010-08-11 00:19:05 +010026targets += int4.c
27$(obj)/int4.c: UNROLL := 4
28$(obj)/int4.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010029 $(call if_changed,unroll)
30
David Woodhousecc4589e2010-08-11 00:19:05 +010031targets += int8.c
32$(obj)/int8.c: UNROLL := 8
33$(obj)/int8.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010034 $(call if_changed,unroll)
35
David Woodhousecc4589e2010-08-11 00:19:05 +010036targets += int16.c
37$(obj)/int16.c: UNROLL := 16
38$(obj)/int16.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010039 $(call if_changed,unroll)
40
David Woodhousecc4589e2010-08-11 00:19:05 +010041targets += int32.c
42$(obj)/int32.c: UNROLL := 32
43$(obj)/int32.c: $(src)/int.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010044 $(call if_changed,unroll)
45
David Woodhousecc4589e2010-08-11 00:19:05 +010046CFLAGS_altivec1.o += $(altivec_flags)
47targets += altivec1.c
48$(obj)/altivec1.c: UNROLL := 1
49$(obj)/altivec1.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010050 $(call if_changed,unroll)
51
David Woodhousecc4589e2010-08-11 00:19:05 +010052CFLAGS_altivec2.o += $(altivec_flags)
53targets += altivec2.c
54$(obj)/altivec2.c: UNROLL := 2
55$(obj)/altivec2.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010056 $(call if_changed,unroll)
57
David Woodhousecc4589e2010-08-11 00:19:05 +010058CFLAGS_altivec4.o += $(altivec_flags)
59targets += altivec4.c
60$(obj)/altivec4.c: UNROLL := 4
61$(obj)/altivec4.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010062 $(call if_changed,unroll)
63
David Woodhousecc4589e2010-08-11 00:19:05 +010064CFLAGS_altivec8.o += $(altivec_flags)
65targets += altivec8.c
66$(obj)/altivec8.c: UNROLL := 8
67$(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010068 $(call if_changed,unroll)
69
70quiet_cmd_mktable = TABLE $@
71 cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 )
72
David Woodhousecc4589e2010-08-11 00:19:05 +010073targets += tables.c
74$(obj)/tables.c: $(obj)/mktables FORCE
David Woodhousef5e70d02009-07-13 11:35:12 +010075 $(call if_changed,mktable)