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