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