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