NetBSD/sys/lib/libkern/arch/sparc/Makefile.inc

41 lines
1.3 KiB
Makefile

# $NetBSD: Makefile.inc,v 1.27 2001/07/01 11:55:36 kleink Exp $
SRCS+= __main.c __assert.c \
imax.c imin.c lmax.c lmin.c max.c min.c ulmax.c ulmin.c \
bswap16.c bswap32.c bswap64.c \
bcmp.c bzero.S ffs.S \
memchr.c memcmp.c memset.S \
strcat.c strcmp.c strcpy.c strlen.S strcasecmp.c \
strncasecmp.c strncmp.c strncpy.c \
scanc.c skpc.c \
htonl.S htons.S ntohl.S ntohs.S \
random.S
SRCS+= mul.S umul.S saveregs.S
# `source' files built from m4 source
# the name `div.o' is taken for the ANSI C `div' function, hence sdiv here
SRCS+= rem.S sdiv.S udiv.S urem.S
CLEANFILES+=rem.S sdiv.S udiv.S urem.S
.PATH.m4: ${KERNDIR}/arch/${MACHINE_ARCH}
sdiv.S: divrem.m4
echo 'building ${.TARGET} from ${.ALLSRC}'
(echo "define(NAME,\`.div')define(OP,\`div')define(S,\`true')"; \
cat ${.ALLSRC}) | m4 > ${.TARGET}
udiv.S: divrem.m4
@echo 'building ${.TARGET} from ${.ALLSRC}'
@(echo "define(NAME,\`.udiv')define(OP,\`div')define(S,\`false')"; \
cat ${.ALLSRC}) | m4 > ${.TARGET}
rem.S: divrem.m4
echo 'building ${.TARGET} from ${.ALLSRC}'
(echo "define(NAME,\`.rem')define(OP,\`rem')define(S,\`true')"; \
cat ${.ALLSRC}) | m4 > ${.TARGET}
urem.S: divrem.m4
@echo 'building ${.TARGET} from ${.ALLSRC}'
@(echo "define(NAME,\`.urem')define(OP,\`rem')define(S,\`false')"; \
cat ${.ALLSRC}) | m4 > ${.TARGET}