Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # Makefile for alpha-specific library files..
  4. #
  5. asflags-y := $(KBUILD_CFLAGS)
  6. ccflags-y := -Werror
  7. # Many of these routines have implementations tuned for ev6.
  8. # Choose them iff we're targeting ev6 specifically.
  9. ev6-$(CONFIG_ALPHA_EV6) := ev6-
  10. # Several make use of the cttz instruction introduced in ev67.
  11. ev67-$(CONFIG_ALPHA_EV67) := ev67-
  12. lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
  13. udiv-qrnnd.o \
  14. udelay.o \
  15. $(ev6-y)memset.o \
  16. $(ev6-y)memcpy.o \
  17. memmove.o \
  18. checksum.o \
  19. csum_partial_copy.o \
  20. $(ev67-y)strlen.o \
  21. stycpy.o \
  22. styncpy.o \
  23. $(ev67-y)strchr.o \
  24. $(ev67-y)strrchr.o \
  25. $(ev6-y)memchr.o \
  26. $(ev6-y)copy_user.o \
  27. $(ev6-y)clear_user.o \
  28. $(ev6-y)csum_ipv6_magic.o \
  29. $(ev6-y)clear_page.o \
  30. $(ev6-y)copy_page.o \
  31. fpreg.o \
  32. callback_srm.o srm_puts.o srm_printk.o \
  33. fls.o
  34. # The division routines are built from single source, with different defines.
  35. AFLAGS___divqu.o = -DDIV
  36. AFLAGS___remqu.o = -DREM
  37. AFLAGS___divlu.o = -DDIV -DINTSIZE
  38. AFLAGS___remlu.o = -DREM -DINTSIZE
  39. $(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
  40. $(src)/$(ev6-y)divide.S FORCE
  41. $(call if_changed_rule,as_o_S)
  42. # There are direct branches between {str*cpy,str*cat} and stx*cpy.
  43. # Ensure the branches are within range by merging these objects.
  44. LDFLAGS_stycpy.o := -r
  45. LDFLAGS_styncpy.o := -r
  46. $(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \
  47. $(obj)/$(ev6-y)stxcpy.o FORCE
  48. $(call if_changed,ld)
  49. $(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \
  50. $(obj)/$(ev6-y)stxncpy.o FORCE
  51. $(call if_changed,ld)