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