Makefile.inc revision 1.43
1# from: @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 2# $NetBSD: Makefile.inc,v 1.43 1998/01/30 23:38:12 perry Exp $ 3 4# string sources 5.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/string ${.CURDIR}/string 6 7SRCS+= bm.c strcasecmp.c strcoll.c strdup.c strerror.c \ 8 strmode.c strsignal.c strtok.c strtok_r.c strxfrm.c \ 9 __strerror.c __strsignal.c 10 11# machine-dependent net sources 12# m-d Makefile.inc must include sources for: 13# bcmp() bcopy() bzero() ffs() index() memchr() memcmp() memset() 14# rindex() strcat() strcmp() strcpy() strcspn() strlen() 15# strncat() strncmp() strncpy() strpbrk() strsep() 16# strspn() strstr() swav() 17# m-d Makefile.inc may include sources for: 18# memcpy() memmove() strchr() strrchr() 19 20.include "${.CURDIR}/arch/${MACHINE_ARCH}/string/Makefile.inc" 21 22# if no machine specific memccpy(3), use the machine independent version. 23.if empty(SRCS:Mmemccpy.S) 24SRCS+= memccpy.c 25.endif 26 27# if no machine specific memmove(3), build one out of bcopy(3). 28.if empty(SRCS:Mmemmove.S) 29OBJS+= memmove.o 30memmove.o: bcopy.c 31 @echo ${COMPILE.c:Q} -DMEMMOVE ${.ALLSRC} -o ${.TARGET} 32 @${COMPILE.c} -DMEMMOVE ${.ALLSRC} -o ${.TARGET}.o 33 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 34 @rm -f ${.TARGET}.o 35 36memmove.po: bcopy.c 37 @echo ${COMPILE.c:Q} -DMEMMOVE -pg ${.ALLSRC} -o ${.TARGET} 38 @${COMPILE.c} -DMEMMOVE -pg ${.ALLSRC} -o ${.TARGET}.o 39 @${LD} -X -r ${.TARGET}.o -o ${.TARGET} 40 @rm -f ${.TARGET}.o 41 42memmove.so: bcopy.c 43 @echo ${COMPILE.c:Q} -DMEMMOVE ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET} 44 @${COMPILE.c} -DMEMMOVE ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o 45 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 46 @rm -f ${.TARGET}.o 47 48LOBJS+= memmove.ln 49memmove.ln: bcopy.c 50 ${LINT} -DMEMMOVE ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \ 51 ${.ALLSRC} 52.endif 53 54# if no machine specific memcpy(3), build one out of bcopy(3). 55# if there is a machine specific memmove(3), we'll assume it aliases 56# memcpy(3). 57.if empty(SRCS:Mmemcpy.S) 58.if empty(SRCS:Mmemmove.S) 59OBJS+= memcpy.o 60memcpy.o: bcopy.c 61 @echo ${COMPILE.c:Q} -DMEMCOPY ${.ALLSRC} -o ${.TARGET} 62 @${COMPILE.c} -DMEMCOPY ${.ALLSRC} -o ${.TARGET}.o 63 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 64 @rm -f ${.TARGET}.o 65 66memcpy.po: bcopy.c 67 @echo ${COMPILE.c:Q} -DMEMCOPY -pg ${.ALLSRC} -o ${.TARGET} 68 @${COMPILE.c} -DMEMCOPY -pg ${.ALLSRC} -o ${.TARGET}.o 69 @${LD} -X -r ${.TARGET}.o -o ${.TARGET} 70 @rm -f ${.TARGET}.o 71 72memcpy.so: bcopy.c 73 @echo ${COMPILE.c:Q} -DMEMCOPY ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET} 74 @${COMPILE.c} -DMEMCOPY ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o 75 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 76 @rm -f ${.TARGET}.o 77 78LOBJS+= memcpy.ln 79memcpy.ln: bcopy.c 80 ${LINT} -DMEMCOPY ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \ 81 ${.ALLSRC} 82.endif 83.endif 84 85# if no machine specific strchr(3), build one out of index(3). 86.if empty(SRCS:Mstrchr.S) 87OBJS+= strchr.o 88strchr.o: index.c 89 @echo ${COMPILE.c:Q} -DSTRCHR ${.ALLSRC} -o ${.TARGET} 90 @${COMPILE.c} -DSTRCHR ${.ALLSRC} -o ${.TARGET}.o 91 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 92 @rm -f ${.TARGET}.o 93 94strchr.po: index.c 95 @echo ${COMPILE.c:Q} -DSTRCHR -pg ${.ALLSRC} -o ${.TARGET} 96 @${COMPILE.c} -DSTRCHR -pg ${.ALLSRC} -o ${.TARGET}.o 97 @${LD} -X -r ${.TARGET}.o -o ${.TARGET} 98 @rm -f ${.TARGET}.o 99 100strchr.so: index.c 101 @echo ${COMPILE.c:Q} -DSTRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET} 102 @${COMPILE.c} -DSTRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o 103 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 104 @rm -f ${.TARGET}.o 105 106LOBJS+= strchr.ln 107strchr.ln: index.c 108 ${LINT} -DSTRCHR ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \ 109 ${.ALLSRC} 110.endif 111 112# if no machine specific strrchr(3), build one out of rindex(3). 113.if empty(SRCS:Mstrrchr.S) 114OBJS+= strrchr.o 115strrchr.o: rindex.c 116 @echo ${COMPILE.c:Q} -DSTRRCHR ${.ALLSRC} -o ${.TARGET} 117 @${COMPILE.c} -DSTRRCHR ${.ALLSRC} -o ${.TARGET}.o 118 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 119 @rm -f ${.TARGET}.o 120 121strrchr.po: rindex.c 122 @echo ${COMPILE.c:Q} -DSTRRCHR -pg ${.ALLSRC} -o ${.TARGET} 123 @${COMPILE.c} -DSTRRCHR -pg ${.ALLSRC} -o ${.TARGET}.o 124 @${LD} -X -r ${.TARGET}.o -o ${.TARGET} 125 @rm -f ${.TARGET}.o 126 127strrchr.so: rindex.c 128 @echo ${COMPILE.c:Q} -DSTRRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET} 129 @${COMPILE.c} -DSTRRCHR ${CPICFLAGS} ${.ALLSRC} -o ${.TARGET}.o 130 @${LD} -x -r ${.TARGET}.o -o ${.TARGET} 131 @rm -f ${.TARGET}.o 132 133LOBJS+= strrchr.ln 134strrchr.ln: rindex.c 135 ${LINT} -DSTRRCHR ${LINTFLAGS} ${CPPFLAGS:M-[IDU]*} -i -o ${.TARGET} \ 136 ${.ALLSRC} 137.endif 138 139MAN+= bm.3 bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \ 140 memcmp.3 memcpy.3 memmove.3 memset.3 rindex.3 strcasecmp.3 strcat.3 \ 141 strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strerror.3 \ 142 string.3 strlen.3 strmode.3 strdup.3 strpbrk.3 strrchr.3 strsep.3 \ 143 strsignal.3 strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 144 145MLINKS+=bm.3 bm_comp.3 bm.3 bm_exec.3 bm.3 bm_free.3 146MLINKS+=strcasecmp.3 strncasecmp.3 147MLINKS+=strcat.3 strncat.3 148MLINKS+=strcmp.3 strncmp.3 149MLINKS+=strcpy.3 strncpy.3 150