xref: /openbmc/linux/lib/raid6/Makefile (revision ae77cbc1)
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
8*ae77cbc1SKen Steeleraid6_pq-$(CONFIG_TILEGX) += tilegx8.o
94f8c55c5SYuanhan Liu
10f5e70d0fSDavid Woodhousehostprogs-y	+= mktables
11f5e70d0fSDavid Woodhouse
12f5e70d0fSDavid Woodhousequiet_cmd_unroll = UNROLL  $@
132144381dSDavid Woodhouse      cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
14f5e70d0fSDavid Woodhouse                   < $< > $@ || ( rm -f $@ && exit 1 )
15f5e70d0fSDavid Woodhouse
16f5e70d0fSDavid Woodhouseifeq ($(CONFIG_ALTIVEC),y)
17f5e70d0fSDavid Woodhousealtivec_flags := -maltivec -mabi=altivec
18f5e70d0fSDavid Woodhouseendif
19f5e70d0fSDavid Woodhouse
20cc4589ebSDavid Woodhousetargets += int1.c
21cc4589ebSDavid Woodhouse$(obj)/int1.c:   UNROLL := 1
22cc4589ebSDavid Woodhouse$(obj)/int1.c:   $(src)/int.uc $(src)/unroll.awk FORCE
23f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
24f5e70d0fSDavid Woodhouse
25cc4589ebSDavid Woodhousetargets += int2.c
26cc4589ebSDavid Woodhouse$(obj)/int2.c:   UNROLL := 2
27cc4589ebSDavid Woodhouse$(obj)/int2.c:   $(src)/int.uc $(src)/unroll.awk FORCE
28f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
29f5e70d0fSDavid Woodhouse
30cc4589ebSDavid Woodhousetargets += int4.c
31cc4589ebSDavid Woodhouse$(obj)/int4.c:   UNROLL := 4
32cc4589ebSDavid Woodhouse$(obj)/int4.c:   $(src)/int.uc $(src)/unroll.awk FORCE
33f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
34f5e70d0fSDavid Woodhouse
35cc4589ebSDavid Woodhousetargets += int8.c
36cc4589ebSDavid Woodhouse$(obj)/int8.c:   UNROLL := 8
37cc4589ebSDavid Woodhouse$(obj)/int8.c:   $(src)/int.uc $(src)/unroll.awk FORCE
38f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
39f5e70d0fSDavid Woodhouse
40cc4589ebSDavid Woodhousetargets += int16.c
41cc4589ebSDavid Woodhouse$(obj)/int16.c:  UNROLL := 16
42cc4589ebSDavid Woodhouse$(obj)/int16.c:  $(src)/int.uc $(src)/unroll.awk FORCE
43f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
44f5e70d0fSDavid Woodhouse
45cc4589ebSDavid Woodhousetargets += int32.c
46cc4589ebSDavid Woodhouse$(obj)/int32.c:  UNROLL := 32
47cc4589ebSDavid Woodhouse$(obj)/int32.c:  $(src)/int.uc $(src)/unroll.awk FORCE
48f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
49f5e70d0fSDavid Woodhouse
50cc4589ebSDavid WoodhouseCFLAGS_altivec1.o += $(altivec_flags)
51cc4589ebSDavid Woodhousetargets += altivec1.c
52cc4589ebSDavid Woodhouse$(obj)/altivec1.c:   UNROLL := 1
53cc4589ebSDavid Woodhouse$(obj)/altivec1.c:   $(src)/altivec.uc $(src)/unroll.awk FORCE
54f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
55f5e70d0fSDavid Woodhouse
56cc4589ebSDavid WoodhouseCFLAGS_altivec2.o += $(altivec_flags)
57cc4589ebSDavid Woodhousetargets += altivec2.c
58cc4589ebSDavid Woodhouse$(obj)/altivec2.c:   UNROLL := 2
59cc4589ebSDavid Woodhouse$(obj)/altivec2.c:   $(src)/altivec.uc $(src)/unroll.awk FORCE
60f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
61f5e70d0fSDavid Woodhouse
62cc4589ebSDavid WoodhouseCFLAGS_altivec4.o += $(altivec_flags)
63cc4589ebSDavid Woodhousetargets += altivec4.c
64cc4589ebSDavid Woodhouse$(obj)/altivec4.c:   UNROLL := 4
65cc4589ebSDavid Woodhouse$(obj)/altivec4.c:   $(src)/altivec.uc $(src)/unroll.awk FORCE
66f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
67f5e70d0fSDavid Woodhouse
68cc4589ebSDavid WoodhouseCFLAGS_altivec8.o += $(altivec_flags)
69cc4589ebSDavid Woodhousetargets += altivec8.c
70cc4589ebSDavid Woodhouse$(obj)/altivec8.c:   UNROLL := 8
71cc4589ebSDavid Woodhouse$(obj)/altivec8.c:   $(src)/altivec.uc $(src)/unroll.awk FORCE
72f5e70d0fSDavid Woodhouse	$(call if_changed,unroll)
73f5e70d0fSDavid Woodhouse
74*ae77cbc1SKen Steeletargets += tilegx8.c
75*ae77cbc1SKen Steele$(obj)/tilegx8.c:   UNROLL := 8
76*ae77cbc1SKen Steele$(obj)/tilegx8.c:   $(src)/tilegx.uc $(src)/unroll.awk FORCE
77*ae77cbc1SKen Steele	$(call if_changed,unroll)
78*ae77cbc1SKen Steele
79f5e70d0fSDavid Woodhousequiet_cmd_mktable = TABLE   $@
80f5e70d0fSDavid Woodhouse      cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 )
81f5e70d0fSDavid Woodhouse
82cc4589ebSDavid Woodhousetargets += tables.c
83cc4589ebSDavid Woodhouse$(obj)/tables.c: $(obj)/mktables FORCE
84f5e70d0fSDavid Woodhouse	$(call if_changed,mktable)
85