1# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93 2 3.PATH: ${.CURDIR}/${MACHINE}/string ${.CURDIR}/string 4 5CFLAGS += -I${.CURDIR}/locale 6# machine-independent string sources 7SRCS+= memccpy.c strcasecmp.c strcoll.c strdup.c strerror.c \ 8 strmode.c strtok.c strxfrm.c 9 10# machine-dependent string sources 11.include "${.CURDIR}/${MACHINE}/string/Makefile.inc" 12 13# If no machine specific bzero(3), build one out of memset(3). 14.if empty(SRCS:Mbzero.S) 15OBJS+= bzero.o 16bzero.o: memset.c 17 ${CC} -DBZERO ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} 18 @${LD} -x -r ${.TARGET} 19 @mv a.out ${.TARGET} 20 21bzero.po: memset.c 22 ${CC} -DBZERO ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} 23 @${LD} -X -r ${.TARGET} 24 @mv a.out ${.TARGET} 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 ${CC} -DMEMMOVE ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} 32 @${LD} -x -r ${.TARGET} 33 @mv a.out ${.TARGET} 34 35memmove.po: bcopy.c 36 ${CC} -DMEMMOVE ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} 37 @${LD} -X -r ${.TARGET} 38 @mv a.out ${.TARGET} 39.endif 40 41# If no machine specific memcpy(3), build one out of bcopy(3). 42.if empty(SRCS:Mmemmove.S) 43OBJS+= memcpy.o 44memcpy.o: bcopy.c 45 ${CC} -DMEMCOPY ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} 46 @${LD} -x -r ${.TARGET} 47 @mv a.out ${.TARGET} 48 49memcpy.po: bcopy.c 50 ${CC} -DMEMCOPY ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} 51 @${LD} -X -r ${.TARGET} 52 @mv a.out ${.TARGET} 53.endif 54 55# If no machine specific strchr(3), build one out of index(3). 56.if empty(SRCS:Mstrchr.S) 57OBJS+= strchr.o 58strchr.o: index.c 59 ${CC} -DSTRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} 60 @${LD} -x -r ${.TARGET} 61 @mv a.out ${.TARGET} 62 63strchr.po: index.c 64 ${CC} -DSTRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} 65 @${LD} -X -r ${.TARGET} 66 @mv a.out ${.TARGET} 67.endif 68 69# If no machine specific strrchr(3), build one out of rindex(3). 70.if empty(SRCS:Mstrrchr.S) 71OBJS+= strrchr.o 72strrchr.o: rindex.c 73 ${CC} -DSTRRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} 74 @${LD} -x -r ${.TARGET} 75 @mv a.out ${.TARGET} 76 77strrchr.po: rindex.c 78 ${CC} -DSTRRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET} 79 @${LD} -X -r ${.TARGET} 80 @mv a.out ${.TARGET} 81.endif 82# 83MAN3+= string/bcmp.3 string/bcopy.3 string/bstring.3 string/bzero.3 \ 84 string/ffs.3 string/index.3 string/memccpy.3 string/memchr.3 \ 85 string/memcmp.3 string/memcpy.3 string/memmove.3 string/memset.3 \ 86 string/rindex.3 string/strcasecmp.3 string/strcat.3 string/strchr.3 \ 87 string/strcmp.3 string/strcoll.3 string/strcpy.3 string/strcspn.3 \ 88 string/string.3 string/strlen.3 string/strmode.3 \ 89 string/strdup.3 string/strerror.3 string/strpbrk.3 string/strrchr.3 \ 90 string/strsep.3 string/strspn.3 string/strstr.3 string/strtok.3 \ 91 string/strxfrm.3 string/swab.3 92# 93MLINKS+=strcasecmp.3 strncasecmp.3 94MLINKS+=strcat.3 strncat.3 95MLINKS+=strcmp.3 strncmp.3 96MLINKS+=strcpy.3 strncpy.3 97MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 98