Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. obj-$(CONFIG_RAID6_PQ) += raid6_pq.o
  2. raid6_pq-y += algos.o recov.o tables.o int1.o int2.o int4.o \
  3. int8.o int16.o int32.o altivec1.o altivec2.o altivec4.o \
  4. altivec8.o mmx.o sse1.o sse2.o
  5. hostprogs-y += mktables
  6. quiet_cmd_unroll = UNROLL $@
  7. cmd_unroll = $(AWK) -f$(srctree)/$(src)/unroll.awk -vN=$(UNROLL) \
  8. < $< > $@ || ( rm -f $@ && exit 1 )
  9. ifeq ($(CONFIG_ALTIVEC),y)
  10. altivec_flags := -maltivec -mabi=altivec
  11. endif
  12. targets += int1.c
  13. $(obj)/int1.c: UNROLL := 1
  14. $(obj)/int1.c: $(src)/int.uc $(src)/unroll.awk FORCE
  15. $(call if_changed,unroll)
  16. targets += int2.c
  17. $(obj)/int2.c: UNROLL := 2
  18. $(obj)/int2.c: $(src)/int.uc $(src)/unroll.awk FORCE
  19. $(call if_changed,unroll)
  20. targets += int4.c
  21. $(obj)/int4.c: UNROLL := 4
  22. $(obj)/int4.c: $(src)/int.uc $(src)/unroll.awk FORCE
  23. $(call if_changed,unroll)
  24. targets += int8.c
  25. $(obj)/int8.c: UNROLL := 8
  26. $(obj)/int8.c: $(src)/int.uc $(src)/unroll.awk FORCE
  27. $(call if_changed,unroll)
  28. targets += int16.c
  29. $(obj)/int16.c: UNROLL := 16
  30. $(obj)/int16.c: $(src)/int.uc $(src)/unroll.awk FORCE
  31. $(call if_changed,unroll)
  32. targets += int32.c
  33. $(obj)/int32.c: UNROLL := 32
  34. $(obj)/int32.c: $(src)/int.uc $(src)/unroll.awk FORCE
  35. $(call if_changed,unroll)
  36. CFLAGS_altivec1.o += $(altivec_flags)
  37. targets += altivec1.c
  38. $(obj)/altivec1.c: UNROLL := 1
  39. $(obj)/altivec1.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
  40. $(call if_changed,unroll)
  41. CFLAGS_altivec2.o += $(altivec_flags)
  42. targets += altivec2.c
  43. $(obj)/altivec2.c: UNROLL := 2
  44. $(obj)/altivec2.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
  45. $(call if_changed,unroll)
  46. CFLAGS_altivec4.o += $(altivec_flags)
  47. targets += altivec4.c
  48. $(obj)/altivec4.c: UNROLL := 4
  49. $(obj)/altivec4.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
  50. $(call if_changed,unroll)
  51. CFLAGS_altivec8.o += $(altivec_flags)
  52. targets += altivec8.c
  53. $(obj)/altivec8.c: UNROLL := 8
  54. $(obj)/altivec8.c: $(src)/altivec.uc $(src)/unroll.awk FORCE
  55. $(call if_changed,unroll)
  56. quiet_cmd_mktable = TABLE $@
  57. cmd_mktable = $(obj)/mktables > $@ || ( rm -f $@ && exit 1 )
  58. targets += tables.c
  59. $(obj)/tables.c: $(obj)/mktables FORCE
  60. $(call if_changed,mktable)