Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. udelay.o \
  14. $(ev6-y)memset.o \
  15. $(ev6-y)memcpy.o \
  16. memmove.o \
  17. checksum.o \
  18. csum_partial_copy.o \
  19. $(ev67-y)strlen.o \
  20. stycpy.o \
  21. styncpy.o \
  22. $(ev67-y)strchr.o \
  23. $(ev67-y)strrchr.o \
  24. $(ev6-y)memchr.o \
  25. $(ev6-y)copy_user.o \
  26. $(ev6-y)clear_user.o \
  27. $(ev6-y)csum_ipv6_magic.o \
  28. $(ev6-y)clear_page.o \
  29. $(ev6-y)copy_page.o \
  30. fpreg.o \
  31. callback_srm.o srm_puts.o srm_printk.o \
  32. fls.o
  33. # The division routines are built from single source, with different defines.
  34. AFLAGS___divqu.o = -DDIV
  35. AFLAGS___remqu.o = -DREM
  36. AFLAGS___divlu.o = -DDIV -DINTSIZE
  37. AFLAGS___remlu.o = -DREM -DINTSIZE
  38. $(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
  39. $(src)/$(ev6-y)divide.S FORCE
  40. $(call if_changed_rule,as_o_S)
  41. # There are direct branches between {str*cpy,str*cat} and stx*cpy.
  42. # Ensure the branches are within range by merging these objects.
  43. LDFLAGS_stycpy.o := -r
  44. LDFLAGS_styncpy.o := -r
  45. $(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \
  46. $(obj)/$(ev6-y)stxcpy.o FORCE
  47. $(call if_changed,ld)
  48. $(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \
  49. $(obj)/$(ev6-y)stxncpy.o FORCE
  50. $(call if_changed,ld)