1994-05-27 05:00:24 +00:00
|
|
|
# @(#)Makefile.inc 8.1 (Berkeley) 6/4/93
|
1997-02-22 15:12:41 +00:00
|
|
|
# $Id$
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/${MACHINE}/string ${.CURDIR}/string
|
|
|
|
|
1995-02-16 17:01:11 +00:00
|
|
|
CFLAGS += -I${.CURDIR}/locale
|
1994-05-27 05:00:24 +00:00
|
|
|
# machine-independent string sources
|
|
|
|
SRCS+= memccpy.c strcasecmp.c strcoll.c strdup.c strerror.c \
|
1995-03-07 04:19:11 +00:00
|
|
|
strmode.c strtok.c strxfrm.c
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
# machine-dependent string sources
|
|
|
|
.include "${.CURDIR}/${MACHINE}/string/Makefile.inc"
|
|
|
|
|
|
|
|
# If no machine specific bzero(3), build one out of memset(3).
|
1994-08-05 01:19:12 +00:00
|
|
|
.if empty(SRCS:Mbzero.S)
|
1994-05-27 05:00:24 +00:00
|
|
|
OBJS+= bzero.o
|
|
|
|
bzero.o: memset.c
|
|
|
|
${CC} -DBZERO ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -x -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
bzero.po: memset.c
|
|
|
|
${CC} -DBZERO ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -X -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# If no machine specific memmove(3), build one out of bcopy(3).
|
1994-08-05 01:19:12 +00:00
|
|
|
.if empty(SRCS:Mmemmove.S)
|
1994-05-27 05:00:24 +00:00
|
|
|
OBJS+= memmove.o
|
|
|
|
memmove.o: bcopy.c
|
|
|
|
${CC} -DMEMMOVE ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -x -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
memmove.po: bcopy.c
|
|
|
|
${CC} -DMEMMOVE ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -X -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# If no machine specific memcpy(3), build one out of bcopy(3).
|
1994-08-05 01:19:12 +00:00
|
|
|
.if empty(SRCS:Mmemmove.S)
|
1994-05-27 05:00:24 +00:00
|
|
|
OBJS+= memcpy.o
|
|
|
|
memcpy.o: bcopy.c
|
|
|
|
${CC} -DMEMCOPY ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -x -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
memcpy.po: bcopy.c
|
|
|
|
${CC} -DMEMCOPY ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -X -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# If no machine specific strchr(3), build one out of index(3).
|
1994-08-05 01:19:12 +00:00
|
|
|
.if empty(SRCS:Mstrchr.S)
|
1994-05-27 05:00:24 +00:00
|
|
|
OBJS+= strchr.o
|
|
|
|
strchr.o: index.c
|
|
|
|
${CC} -DSTRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -x -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
strchr.po: index.c
|
|
|
|
${CC} -DSTRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -X -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# If no machine specific strrchr(3), build one out of rindex(3).
|
1994-08-05 01:19:12 +00:00
|
|
|
.if empty(SRCS:Mstrrchr.S)
|
1994-05-27 05:00:24 +00:00
|
|
|
OBJS+= strrchr.o
|
|
|
|
strrchr.o: rindex.c
|
|
|
|
${CC} -DSTRRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -x -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
|
|
|
|
strrchr.po: rindex.c
|
|
|
|
${CC} -DSTRRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
|
|
|
|
@${LD} -X -r ${.TARGET}
|
1996-05-07 23:19:49 +00:00
|
|
|
@mv -f a.out ${.TARGET}
|
1994-05-27 05:00:24 +00:00
|
|
|
.endif
|
1994-08-05 01:19:12 +00:00
|
|
|
#
|
|
|
|
MAN3+= string/bcmp.3 string/bcopy.3 string/bstring.3 string/bzero.3 \
|
|
|
|
string/ffs.3 string/index.3 string/memccpy.3 string/memchr.3 \
|
|
|
|
string/memcmp.3 string/memcpy.3 string/memmove.3 string/memset.3 \
|
|
|
|
string/rindex.3 string/strcasecmp.3 string/strcat.3 string/strchr.3 \
|
|
|
|
string/strcmp.3 string/strcoll.3 string/strcpy.3 string/strcspn.3 \
|
1994-09-13 21:26:08 +00:00
|
|
|
string/string.3 string/strlen.3 string/strmode.3 \
|
1994-08-05 01:19:12 +00:00
|
|
|
string/strdup.3 string/strerror.3 string/strpbrk.3 string/strrchr.3 \
|
|
|
|
string/strsep.3 string/strspn.3 string/strstr.3 string/strtok.3 \
|
|
|
|
string/strxfrm.3 string/swab.3
|
|
|
|
#
|
1994-05-27 05:00:24 +00:00
|
|
|
MLINKS+=strcasecmp.3 strncasecmp.3
|
|
|
|
MLINKS+=strcat.3 strncat.3
|
|
|
|
MLINKS+=strcmp.3 strncmp.3
|
|
|
|
MLINKS+=strcpy.3 strncpy.3
|
1996-02-12 04:57:03 +00:00
|
|
|
MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3
|