replace several special targets with stub .c files, as in libc/string
This commit is contained in:
parent
8079ec33a6
commit
974739923b
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.45 1998/08/03 20:32:48 perry Exp $
|
||||
# $NetBSD: Makefile,v 1.46 1998/08/04 05:01:58 perry Exp $
|
||||
|
||||
LIB= kern
|
||||
NOPIC=
|
||||
|
@ -33,112 +33,26 @@ CLEANFILES+= lib${LIB}.o lib${LIB}.po
|
|||
mcount.po: mcount.o
|
||||
cp mcount.o mcount.po
|
||||
|
||||
# if no machine specific memcpy(3), build one out of bcopy(3).
|
||||
# XXX these stub builds should be cleaned up even further.
|
||||
|
||||
# if no machine specific memcpy(3), build one out of bcopy(3) based stub.
|
||||
.if empty(SRCS:Mmemcpy.S)
|
||||
OBJS+= memcpy.o
|
||||
memcpy.o: bcopy.c
|
||||
@echo ${COMPILE.c:Q} -DMEMCOPY ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DMEMCOPY ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
memcpy.po: bcopy.c
|
||||
@echo ${COMPILE.c:Q} -DMEMCOPY -pg ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DMEMCOPY -pg ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
memcpy.so: bcopy.c
|
||||
@echo ${COMPILE.c:Q} -DMEMCOPY ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DMEMCOPY ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
LOBJS+= memcpy.ln
|
||||
memcpy.ln: bcopy.c
|
||||
${LINT} -DMEMCOPY ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \
|
||||
${.ALLSRC}
|
||||
SRCS+= memcpy.c
|
||||
.endif
|
||||
|
||||
# if no machine specific memmove(3), build one out of bcopy(3).
|
||||
# if no machine specific memmove(3), build one out of bcopy(3) based stub.
|
||||
.if empty(SRCS:Mmemmove.S)
|
||||
OBJS+= memmove.o
|
||||
memmove.o: bcopy.c
|
||||
@echo ${COMPILE.c:Q} -DMEMMOVE ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DMEMMOVE ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
memmove.po: bcopy.c
|
||||
@echo ${COMPILE.c:Q} -DMEMMOVE -pg ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DMEMMOVE -pg ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
memmove.so: bcopy.c
|
||||
@echo ${COMPILE.c:Q} -DMEMMOVE ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DMEMMOVE ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
LOBJS+= memmove.ln
|
||||
memmove.ln: bcopy.c
|
||||
${LINT} -DMEMMOVE ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \
|
||||
${.ALLSRC}
|
||||
SRCS+= memmove.c
|
||||
.endif
|
||||
|
||||
# if no machine specific strchr(3), build one out of index(3).
|
||||
# if no machine specific strchr(3), build one out of index(3) based stub.
|
||||
.if empty(SRCS:Mstrchr.S)
|
||||
OBJS+= strchr.o
|
||||
strchr.o: index.c
|
||||
@echo ${COMPILE.c:Q} -DSTRCHR ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DSTRCHR ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
strchr.po: index.c
|
||||
@echo ${COMPILE.c:Q} -DSTRCHR -pg ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DSTRCHR -pg ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
strchr.so: index.c
|
||||
@echo ${COMPILE.c:Q} -DSTRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DSTRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
LOBJS+= strchr.ln
|
||||
strchr.ln: index.c
|
||||
${LINT} -DSTRCHR ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \
|
||||
${.ALLSRC}
|
||||
SRCS+= strchr.c
|
||||
.endif
|
||||
|
||||
# if no machine specific strrchr(3), build one out of rindex(3).
|
||||
# if no machine specific strrchr(3), build one out of rindex(3) based stub.
|
||||
.if empty(SRCS:Mstrrchr.S)
|
||||
OBJS+= strrchr.o
|
||||
strrchr.o: rindex.c
|
||||
@echo ${COMPILE.c:Q} -DSTRRCHR ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DSTRRCHR ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
strrchr.po: rindex.c
|
||||
@echo ${COMPILE.c:Q} -DSTRRCHR -pg ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DSTRRCHR -pg ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -X -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
strrchr.so: rindex.c
|
||||
@echo ${COMPILE.c:Q} -DSTRRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}
|
||||
@${COMPILE.c} -DSTRRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o
|
||||
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
||||
@rm -f ${.TARGET}.o
|
||||
|
||||
LOBJS+= strrchr.ln
|
||||
strrchr.ln: rindex.c
|
||||
${LINT} -DSTRRCHR ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \
|
||||
${.ALLSRC}
|
||||
SRCS+= strrchr.c
|
||||
.endif
|
||||
|
||||
POBJS+= ${OBJS:.o=.po} mcount.po
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
/* $NetBSD: memcpy.c,v 1.1 1998/08/04 05:01:58 perry Exp $ */
|
||||
|
||||
#define MEMCOPY
|
||||
#include "bcopy.c"
|
|
@ -0,0 +1,4 @@
|
|||
/* $NetBSD: memmove.c,v 1.1 1998/08/04 05:01:58 perry Exp $ */
|
||||
|
||||
#define MEMMOVE
|
||||
#include "bcopy.c"
|
|
@ -0,0 +1,4 @@
|
|||
/* $NetBSD: strchr.c,v 1.5 1998/08/04 05:01:58 perry Exp $ */
|
||||
|
||||
#define STRCHR
|
||||
#include "index.c"
|
|
@ -0,0 +1,4 @@
|
|||
/* $NetBSD: strrchr.c,v 1.1 1998/08/04 05:01:58 perry Exp $ */
|
||||
|
||||
#define STRRCHR
|
||||
#include "rindex.c"
|
Loading…
Reference in New Issue