xref: /original-bsd/lib/libc/string/Makefile.inc (revision 49967ffc)
1*49967ffcSbostic#	@(#)Makefile.inc	8.1 (Berkeley) 06/04/93
29327739eSbostic
39327739eSbostic.PATH: ${.CURDIR}/${MACHINE}/string ${.CURDIR}/string
49327739eSbostic
56eb1decfSbostic# machine-independent string sources
6bd20f668SbosticSRCS+=	memccpy.c strcasecmp.c strcoll.c strdup.c strerror.c \
79327739eSbostic	strftime.c strmode.c strtok.c strxfrm.c swab.c
89327739eSbostic
96eb1decfSbostic# machine-dependent string sources
106eb1decfSbostic.include "${.CURDIR}/${MACHINE}/string/Makefile.inc"
119327739eSbostic
1214e8094dSbostic# If no machine specific bzero(3), build one out of memset(3).
1314e8094dSbostic.if empty(SRCS:Mbzero.s)
1414e8094dSbosticOBJS+=	bzero.o
1514e8094dSbosticbzero.o: memset.c
1614e8094dSbostic	${CC} -DBZERO ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
1714e8094dSbostic	@${LD} -x -r ${.TARGET}
1814e8094dSbostic	@mv a.out ${.TARGET}
1914e8094dSbostic
2014e8094dSbosticbzero.po: memset.c
2114e8094dSbostic	${CC} -DBZERO ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
2214e8094dSbostic	@${LD} -X -r ${.TARGET}
2314e8094dSbostic	@mv a.out ${.TARGET}
2414e8094dSbostic.endif
2514e8094dSbostic
266eb1decfSbostic# If no machine specific memmove(3), build one out of bcopy(3).
279327739eSbostic.if empty(SRCS:Mmemmove.s)
289327739eSbosticOBJS+=	memmove.o
299327739eSbosticmemmove.o: bcopy.c
309327739eSbostic	${CC} -DMEMMOVE ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
319327739eSbostic	@${LD} -x -r ${.TARGET}
329327739eSbostic	@mv a.out ${.TARGET}
339327739eSbostic
349327739eSbosticmemmove.po: bcopy.c
359327739eSbostic	${CC} -DMEMMOVE ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
369327739eSbostic	@${LD} -X -r ${.TARGET}
379327739eSbostic	@mv a.out ${.TARGET}
389327739eSbostic.endif
399327739eSbostic
406eb1decfSbostic# If no machine specific memcpy(3), build one out of bcopy(3).
419327739eSbostic.if empty(SRCS:Mmemcpy.s)
429327739eSbosticOBJS+=	memcpy.o
439327739eSbosticmemcpy.o: bcopy.c
449327739eSbostic	${CC} -DMEMCOPY ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
459327739eSbostic	@${LD} -x -r ${.TARGET}
469327739eSbostic	@mv a.out ${.TARGET}
479327739eSbostic
489327739eSbosticmemcpy.po: bcopy.c
499327739eSbostic	${CC} -DMEMCOPY ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
509327739eSbostic	@${LD} -X -r ${.TARGET}
519327739eSbostic	@mv a.out ${.TARGET}
529327739eSbostic.endif
539327739eSbostic
546eb1decfSbostic# If no machine specific strchr(3), build one out of index(3).
559327739eSbostic.if empty(SRCS:Mstrchr.s)
569327739eSbosticOBJS+=	strchr.o
579327739eSbosticstrchr.o: index.c
589327739eSbostic	${CC} -DSTRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
599327739eSbostic	@${LD} -x -r ${.TARGET}
609327739eSbostic	@mv a.out ${.TARGET}
619327739eSbostic
629327739eSbosticstrchr.po: index.c
639327739eSbostic	${CC} -DSTRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
649327739eSbostic	@${LD} -X -r ${.TARGET}
659327739eSbostic	@mv a.out ${.TARGET}
669327739eSbostic.endif
679327739eSbostic
686eb1decfSbostic# If no machine specific strrchr(3), build one out of rindex(3).
699327739eSbostic.if empty(SRCS:Mstrrchr.s)
709327739eSbosticOBJS+=	strrchr.o
719327739eSbosticstrrchr.o: rindex.c
729327739eSbostic	${CC} -DSTRRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
739327739eSbostic	@${LD} -x -r ${.TARGET}
749327739eSbostic	@mv a.out ${.TARGET}
759327739eSbostic
769327739eSbosticstrrchr.po: rindex.c
779327739eSbostic	${CC} -DSTRRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
789327739eSbostic	@${LD} -X -r ${.TARGET}
799327739eSbostic	@mv a.out ${.TARGET}
809327739eSbostic.endif
819327739eSbostic
829327739eSbosticMAN3+=	bcmp.0 bcopy.0 bstring.0 bzero.0 ffs.0 index.0 memccpy.0 memchr.0 \
839327739eSbostic	memcmp.0 memcpy.0 memmove.0 memset.0 rindex.0 strcasecmp.0 strcat.0 \
849327739eSbostic	strchr.0 strcmp.0 strcoll.0 strcpy.0 strcspn.0 strftime.0 string.0 \
85bd20f668Sbostic	strlen.0 strmode.0 strdup.0 strerror.0 strpbrk.0 strrchr.0 strsep.0 \
86bd20f668Sbostic	strspn.0 strstr.0 strtok.0 strxfrm.0 swab.0
8709e1ceecSbostic
8809e1ceecSbosticMLINKS+=strcasecmp.3 strncasecmp.3
8909e1ceecSbosticMLINKS+=strcat.3 strncat.3
9009e1ceecSbosticMLINKS+=strcmp.3 strncmp.3
9109e1ceecSbosticMLINKS+=strcpy.3 strncpy.3
92bd20f668SbosticMLINKS+=strerror.3 perror.3
93