xref: /openbmc/linux/arch/alpha/lib/Makefile (revision 4758ce82)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# Makefile for alpha-specific library files..
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds
58a362cd6Smatt mooneyasflags-y := $(KBUILD_CFLAGS)
68a362cd6Smatt mooneyccflags-y := -Werror
71da177e4SLinus Torvalds
81da177e4SLinus Torvalds# Many of these routines have implementations tuned for ev6.
91da177e4SLinus Torvalds# Choose them iff we're targeting ev6 specifically.
101da177e4SLinus Torvaldsev6-$(CONFIG_ALPHA_EV6) := ev6-
111da177e4SLinus Torvalds
121da177e4SLinus Torvalds# Several make use of the cttz instruction introduced in ev67.
131da177e4SLinus Torvaldsev67-$(CONFIG_ALPHA_EV67) := ev67-
141da177e4SLinus Torvalds
151da177e4SLinus Torvaldslib-y =	__divqu.o __remqu.o __divlu.o __remlu.o \
161da177e4SLinus Torvalds	udelay.o \
171da177e4SLinus Torvalds	$(ev6-y)memset.o \
181da177e4SLinus Torvalds	$(ev6-y)memcpy.o \
191da177e4SLinus Torvalds	memmove.o \
201da177e4SLinus Torvalds	checksum.o \
211da177e4SLinus Torvalds	csum_partial_copy.o \
221da177e4SLinus Torvalds	$(ev67-y)strlen.o \
234758ce82SRichard Henderson	stycpy.o \
244758ce82SRichard Henderson	styncpy.o \
251da177e4SLinus Torvalds	$(ev67-y)strchr.o \
261da177e4SLinus Torvalds	$(ev67-y)strrchr.o \
271da177e4SLinus Torvalds	$(ev6-y)memchr.o \
281da177e4SLinus Torvalds	$(ev6-y)copy_user.o \
291da177e4SLinus Torvalds	$(ev6-y)clear_user.o \
301da177e4SLinus Torvalds	$(ev6-y)csum_ipv6_magic.o \
311da177e4SLinus Torvalds	$(ev6-y)clear_page.o \
321da177e4SLinus Torvalds	$(ev6-y)copy_page.o \
331da177e4SLinus Torvalds	fpreg.o \
3474fd1b68SRichard Henderson	callback_srm.o srm_puts.o srm_printk.o \
3574fd1b68SRichard Henderson	fls.o
361da177e4SLinus Torvalds
371da177e4SLinus Torvaldslib-$(CONFIG_SMP) += dec_and_lock.o
381da177e4SLinus Torvalds
391da177e4SLinus Torvalds# The division routines are built from single source, with different defines.
401da177e4SLinus TorvaldsAFLAGS___divqu.o = -DDIV
411da177e4SLinus TorvaldsAFLAGS___remqu.o =       -DREM
421da177e4SLinus TorvaldsAFLAGS___divlu.o = -DDIV       -DINTSIZE
431da177e4SLinus TorvaldsAFLAGS___remlu.o =       -DREM -DINTSIZE
441da177e4SLinus Torvalds
45e19a4e3fSMasahiro Yamada$(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
463eec0291SMasahiro Yamada						$(src)/$(ev6-y)divide.S FORCE
473eec0291SMasahiro Yamada	$(call if_changed_rule,as_o_S)
484758ce82SRichard Henderson
494758ce82SRichard Henderson# There are direct branches between {str*cpy,str*cat} and stx*cpy.
504758ce82SRichard Henderson# Ensure the branches are within range by merging these objects.
514758ce82SRichard Henderson
524758ce82SRichard HendersonLDFLAGS_stycpy.o := -r
534758ce82SRichard HendersonLDFLAGS_styncpy.o := -r
544758ce82SRichard Henderson
554758ce82SRichard Henderson$(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \
564758ce82SRichard Henderson		 $(obj)/$(ev6-y)stxcpy.o FORCE
574758ce82SRichard Henderson	$(call if_changed,ld)
584758ce82SRichard Henderson
594758ce82SRichard Henderson$(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \
604758ce82SRichard Henderson		 $(obj)/$(ev6-y)stxncpy.o FORCE
614758ce82SRichard Henderson	$(call if_changed,ld)
62