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