xref: /netbsd/sys/lib/libkern/arch/sparc64/Makefile.inc (revision 4e9e8358)
1#	$NetBSD: Makefile.inc,v 1.11 2013/03/17 04:47:16 nakayama Exp $
2
3SRCS+=	ffs.S
4SRCS+=	strlen.S
5SRCS+=	htonl.S htons.S ntohl.S ntohs.S
6SRCS+=	random.S
7
8SRCS+=	bswap16.c bswap32.c
9
10SRCS+=	mul.S saveregs.S umul.S
11
12# `source' files built from m4 source
13# the name `div.o' is taken for the ANSI C `div' function, hence sdiv here
14SRCS+=	rem.S sdiv.S udiv.S urem.S
15CLEANFILES+=rem.S sdiv.S udiv.S urem.S
16
17sdiv.S: $M/divrem.m4
18	echo 'building ${.TARGET} from ${.ALLSRC}'
19	(echo "define(NAME,\`.div')define(OP,\`div')define(S,\`true')"; \
20	 cat ${.ALLSRC}) | ${TOOL_M4} > ${.TARGET}
21
22udiv.S: $M/divrem.m4
23	@echo 'building ${.TARGET} from ${.ALLSRC}'
24	@(echo "define(NAME,\`.udiv')define(OP,\`div')define(S,\`false')"; \
25	 cat ${.ALLSRC}) | ${TOOL_M4} > ${.TARGET}
26
27rem.S:	$M/divrem.m4
28	echo 'building ${.TARGET} from ${.ALLSRC}'
29	(echo "define(NAME,\`.rem')define(OP,\`rem')define(S,\`true')"; \
30	 cat ${.ALLSRC}) | ${TOOL_M4} > ${.TARGET}
31
32urem.S: $M/divrem.m4
33	@echo 'building ${.TARGET} from ${.ALLSRC}'
34	@(echo "define(NAME,\`.urem')define(OP,\`rem')define(S,\`false')"; \
35	 cat ${.ALLSRC}) | ${TOOL_M4} > ${.TARGET}
36