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