Home | History | Annotate | Line # | Download | only in string
Makefile.inc revision 1.35
      1 #	from: @(#)Makefile.inc	5.6 (Berkeley) 3/5/91
      2 #	$Id: Makefile.inc,v 1.35 1995/03/20 14:47:39 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 strsignal.c strtok.c strxfrm.c \
      9 	__strerror.c __strsignal.c
     10 
     11 # machine-dependent net sources
     12 # m-d Makefile.inc must include sources for:
     13 #	bcmp() bcopy() bzero() ffs() index() memchr() memcmp() memset()
     14 #	rindex() strcat() strcmp() strcpy() strcspn() strlen()
     15 #	strncat() strncmp() strncpy() strpbrk() strsep()
     16 #	strspn() strstr() swav()
     17 # m-d Makefile.inc may include sources for:
     18 #	memcpy() memmove() strchr() strrchr()
     19 
     20 .include "${.CURDIR}/arch/${MACHINE_ARCH}/string/Makefile.inc"
     21 
     22 # if no machine specific memmove(3), build one out of bcopy(3).
     23 .if empty(SRCS:Mmemmove.S)
     24 OBJS+=	memmove.o
     25 memmove.o: bcopy.c
     26 	${CC} -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
     27 	@${LD} -x -r ${.TARGET}
     28 	@mv a.out ${.TARGET}
     29 
     30 memmove.po: bcopy.c
     31 	${CC} -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
     32 	@${LD} -X -r ${.TARGET}
     33 	@mv a.out ${.TARGET}
     34 
     35 memmove.so: bcopy.c
     36 	${CC} ${PICFLAG} -DPIC -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
     37 		-o ${.TARGET}
     38 .endif
     39 
     40 # if no machine specific memcpy(3), build one out of bcopy(3).
     41 # if there is a machine specific memmove(3), we'll assume it aliases
     42 # memcpy(3).
     43 .if empty(SRCS:Mmemcpy.S)
     44 .if empty(SRCS:Mmemmove.S)
     45 OBJS+=	memcpy.o
     46 memcpy.o: bcopy.c
     47 	${CC} -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
     48 	@${LD} -x -r ${.TARGET}
     49 	@mv a.out ${.TARGET}
     50 
     51 memcpy.po: bcopy.c
     52 	${CC} -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
     53 	@${LD} -X -r ${.TARGET}
     54 	@mv a.out ${.TARGET}
     55 
     56 memcpy.so: bcopy.c
     57 	${CC} ${PICFLAG} -DPIC -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
     58 		-o ${.TARGET}
     59 .endif
     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} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
     67 	@${LD} -x -r ${.TARGET}
     68 	@mv a.out ${.TARGET}
     69 
     70 strchr.po: index.c
     71 	${CC} -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
     72 	@${LD} -X -r ${.TARGET}
     73 	@mv a.out ${.TARGET}
     74 
     75 strchr.so: index.c
     76 	${CC} ${PICFLAG} -DPIC -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
     77 	    -o ${.TARGET}
     78 .endif
     79 
     80 # if no machine specific strrchr(3), build one out of rindex(3).
     81 .if empty(SRCS:Mstrrchr.S)
     82 OBJS+=	strrchr.o
     83 strrchr.o: rindex.c
     84 	${CC} -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
     85 	@${LD} -x -r ${.TARGET}
     86 	@mv a.out ${.TARGET}
     87 
     88 strrchr.po: rindex.c
     89 	${CC} -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
     90 	@${LD} -X -r ${.TARGET}
     91 	@mv a.out ${.TARGET}
     92 
     93 strrchr.so: rindex.c
     94 	${CC} ${PICFLAG} -DPIC -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
     95 	    -o ${.TARGET}
     96 .endif
     97 
     98 MAN+=	bm.3 bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \
     99 	memcmp.3 memcpy.3 memmove.3 memset.3 rindex.3 strcasecmp.3 strcat.3 \
    100 	strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strerror.3 strftime.3 \
    101 	string.3 strlen.3 strmode.3 strdup.3 strpbrk.3 strrchr.3 strsep.3 \
    102 	strsignal.3 strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3
    103 
    104 MLINKS+=bm.3 bm_comp.3 bm.3 bm_exec.3 bm.3 bm_free.3
    105 MLINKS+=strcasecmp.3 strncasecmp.3
    106 MLINKS+=strcat.3 strncat.3
    107 MLINKS+=strcmp.3 strncmp.3
    108 MLINKS+=strcpy.3 strncpy.3
    109