Home | History | Annotate | Line # | Download | only in string
Makefile.inc revision 1.28
      1 #	from: @(#)Makefile.inc	5.6 (Berkeley) 3/5/91
      2 #	$Id: Makefile.inc,v 1.28 1994/07/06 04:07:53 mycroft Exp $
      3 
      4 # string sources
      5 .PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/string ${.CURDIR}/string
      6 
      7 SRCS+=	bm.c memccpy.c strcasecmp.c strcoll.c strdup.c strerror.c \
      8 	strftime.c strmode.c strtok.c strxfrm.c
      9 
     10 .if   (${MACHINE_ARCH} == "m68k")
     11 SRCS+=	bcmp.S bcopy.S bzero.S ffs.S index.S memchr.c memcmp.S memset.S \
     12 	rindex.S strcat.c strcmp.S strcpy.S strcspn.c strlen.S \
     13 	strncat.c strncmp.S strncpy.S strpbrk.c strsep.c \
     14 	strspn.c strstr.c swab.S
     15 SRCS+=	memcpy.S memmove.S strchr.S strrchr.S
     16 .elif (${MACHINE_ARCH} == "i386")
     17 SRCS+=	bcmp.S bcopy.S bzero.S ffs.S index.S memchr.S memcmp.S memset.S \
     18 	rindex.S strcat.S strcmp.S strcpy.S strcspn.c strlen.S \
     19 	strncat.c strncmp.S strncpy.c strpbrk.c strsep.c \
     20 	strspn.c strstr.c swab.S
     21 SRCS+=	memcpy.S memmove.S strchr.S strrchr.S
     22 .elif (${MACHINE_ARCH} == "ns32k")
     23 SRCS+=	bcmp.c bcopy.c bzero.c ffs.c index.c memchr.c memcmp.c memset.c \
     24 	rindex.c strcat.c strcmp.c strcpy.c strcspn.c strlen.c \
     25 	strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \
     26 	strspn.c strstr.c swab.c
     27 #SRCS+=	memmove.c strchr.c strrchr.c
     28 .elif (${MACHINE_ARCH} == "tahoe")
     29 SRCS+=	bcmp.S bcopy.S bzero.S ffs.S index.c memchr.c memcmp.S memset.c \
     30 	rindex.c strcat.S strcmp.S strcpy.S strcspn.c strlen.S \
     31 	strncat.S strncmp.S strncpy.S strpbrk.c strsep.c \
     32 	strspn.c strstr.c swab.c
     33 SRCS+=	memmove.S
     34 .elif (${MACHINE_ARCH} == "vax")
     35 SRCS+=	bcmp.S bcopy.S bzero.S ffs.S index.c memchr.S memcmp.S memset.S \
     36 	rindex.S strcat.S strcmp.S strcpy.S strcspn.S strlen.S \
     37 	strncat.S strncmp.S strncpy.S strpbrk.S strsep.S \
     38 	strspn.S strstr.S swab.c
     39 SRCS+=	memmove.S strchr.S strrchr.S
     40 .elif (${MACHINE_ARCH} == "sparc")
     41 SRCS+=	bcmp.c bcopy.c bzero.S ffs.S index.c memchr.c memcmp.c memset.c \
     42 	rindex.c strcat.c strcmp.c strcpy.c strcspn.c strlen.S \
     43 	strncat.c strncmp.c strncpy.c strpbrk.c strsep.c \
     44 	strspn.c strstr.c swab.c
     45 .endif
     46 
     47 # if no machine specific memmove(3), build one out of bcopy(3).
     48 .if empty(SRCS:Mmemmove.S)
     49 OBJS+=	memmove.o
     50 memmove.o: bcopy.c
     51 	${CC} -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
     52 	@${LD} -x -r ${.TARGET}
     53 	@mv a.out ${.TARGET}
     54 
     55 memmove.po: bcopy.c
     56 	${CC} -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
     57 	@${LD} -X -r ${.TARGET}
     58 	@mv a.out ${.TARGET}
     59 
     60 memmove.so: bcopy.c
     61 	${CC} ${PICFLAG} -DPIC -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
     62 		-o ${.TARGET}
     63 .endif
     64 
     65 # if no machine specific memcpy(3), build one out of bcopy(3).
     66 # if there is a machine specific memmove(3), we'll assume it aliases
     67 # memcpy(3).
     68 .if empty(SRCS:Mmemcpy.S)
     69 .if empty(SRCS:Mmemmove.S)
     70 OBJS+=	memcpy.o
     71 memcpy.o: bcopy.c
     72 	${CC} -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
     73 	@${LD} -x -r ${.TARGET}
     74 	@mv a.out ${.TARGET}
     75 
     76 memcpy.po: bcopy.c
     77 	${CC} -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
     78 	@${LD} -X -r ${.TARGET}
     79 	@mv a.out ${.TARGET}
     80 
     81 memcpy.so: bcopy.c
     82 	${CC} ${PICFLAG} -DPIC -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
     83 		-o ${.TARGET}
     84 .endif
     85 .endif
     86 
     87 # if no machine specific strchr(3), build one out of index(3).
     88 .if empty(SRCS:Mstrchr.S)
     89 OBJS+=	strchr.o
     90 strchr.o: index.c
     91 	${CC} -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
     92 	@${LD} -x -r ${.TARGET}
     93 	@mv a.out ${.TARGET}
     94 
     95 strchr.po: index.c
     96 	${CC} -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
     97 	@${LD} -X -r ${.TARGET}
     98 	@mv a.out ${.TARGET}
     99 
    100 strchr.so: index.c
    101 	${CC} ${PICFLAG} -DPIC -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
    102 	    -o ${.TARGET}
    103 .endif
    104 
    105 # if no machine specific strrchr(3), build one out of rindex(3).
    106 .if empty(SRCS:Mstrrchr.S)
    107 OBJS+=	strrchr.o
    108 strrchr.o: rindex.c
    109 	${CC} -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
    110 	@${LD} -x -r ${.TARGET}
    111 	@mv a.out ${.TARGET}
    112 
    113 strrchr.po: rindex.c
    114 	${CC} -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
    115 	@${LD} -X -r ${.TARGET}
    116 	@mv a.out ${.TARGET}
    117 
    118 strrchr.so: rindex.c
    119 	${CC} ${PICFLAG} -DPIC -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
    120 	    -o ${.TARGET}
    121 .endif
    122 
    123 MAN3+=	bm.0 bcmp.0 bcopy.0 bstring.0 bzero.0 ffs.0 index.0 memccpy.0 memchr.0 \
    124 	memcmp.0 memcpy.0 memmove.0 memset.0 rindex.0 strcasecmp.0 strcat.0 \
    125 	strchr.0 strcmp.0 strcoll.0 strcpy.0 strcspn.0 strerror.0 strftime.0 \
    126 	string.0 strlen.0 strmode.0 strdup.0 strpbrk.0 strrchr.0 strsep.0 \
    127 	strspn.0 strstr.0 strtok.0 strxfrm.0 swab.0
    128 
    129 MLINKS+=bm.3 bm_comp.3 bm.3 bm_exec.3 bm.3 bm_free.3
    130 MLINKS+=strcasecmp.3 strncasecmp.3
    131 MLINKS+=strcat.3 strncat.3
    132 MLINKS+=strcmp.3 strncmp.3
    133 MLINKS+=strcpy.3 strncpy.3
    134