* Updated DEFS.h to include ALTENTRY() and ALTASENTRY() for alternate
[unix-history] / lib / libc / string / Makefile.inc
CommitLineData
15637ed4
RG
1# @(#)Makefile.inc 5.6 (Berkeley) 3/5/91
2
3# string sources
4.PATH: ${.CURDIR}/${MACHINE}/string ${.CURDIR}/string
5
6SRCS+= memccpy.c strcasecmp.c strcoll.c strdup.c \
7 strftime.c strmode.c strtok.c strxfrm.c swab.c
8
9.if (${MACHINE} == "hp300")
10SRCS+= 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")
8d93009e
C
15SRCS+= bcmp.s bcopy.s bzero.s ffs.s index.s memchr.s memcmp.s memset.s \
16 rindex.s strcat.s strcmp.s strcpy.s strcspn.c strlen.s \
17 strncat.c strncmp.s strncpy.c strpbrk.c strsep.c \
15637ed4 18 strspn.c strstr.c
04af8261 19SRCS+= memmove.s strchr.s strrchr.s
15637ed4
RG
20.elif (${MACHINE} == "tahoe")
21SRCS+= 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
25SRCS+= memmove.s
26.elif (${MACHINE} == "vax")
27SRCS+= 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
31SRCS+= memmove.s strchr.s strrchr.s
32.endif
33
34# if no machine specific memmove(3), build one out of bcopy(3).
04af8261 35.if empty(SRCS:Mmemcpy.s)
15637ed4
RG
36.if empty(SRCS:Mmemmove.s)
37OBJS+= memmove.o
38memmove.o: bcopy.c
39 ${CC} -DMEMMOVE ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
40 @${LD} -x -r ${.TARGET}
41 @mv a.out ${.TARGET}
42
43memmove.po: bcopy.c
44 ${CC} -DMEMMOVE ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
45 @${LD} -X -r ${.TARGET}
46 @mv a.out ${.TARGET}
47.endif
15637ed4
RG
48.endif
49
50# if no machine specific strchr(3), build one out of index(3).
51.if empty(SRCS:Mstrchr.s)
52OBJS+= strchr.o
53strchr.o: index.c
54 ${CC} -DSTRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
55 @${LD} -x -r ${.TARGET}
56 @mv a.out ${.TARGET}
57
58strchr.po: index.c
59 ${CC} -DSTRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
60 @${LD} -X -r ${.TARGET}
61 @mv a.out ${.TARGET}
62.endif
63
64# if no machine specific strrchr(3), build one out of rindex(3).
65.if empty(SRCS:Mstrrchr.s)
66OBJS+= strrchr.o
67strrchr.o: rindex.c
68 ${CC} -DSTRRCHR ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
69 @${LD} -x -r ${.TARGET}
70 @mv a.out ${.TARGET}
71
72strrchr.po: rindex.c
73 ${CC} -DSTRRCHR ${CFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
74 @${LD} -X -r ${.TARGET}
75 @mv a.out ${.TARGET}
76.endif
77
4db4d4b7
RM
78MAN3+= string/bcmp.3 string/bcopy.3 string/bstring.3 string/bzero.3 \
79 string/ffs.3 string/index.3 string/memccpy.3 string/memchr.3 \
80 string/memcmp.3 string/memcpy.3 string/memmove.3 string/memset.3 \
81 string/rindex.3 string/strcasecmp.3 string/strcat.3 \
82 string/strchr.3 string/strcmp.3 string/strcoll.3 string/strcpy.3 \
83 string/strcspn.3 string/strftime.3 string/string.3 \
84 string/strlen.3 string/strmode.3 string/strdup.3 string/strpbrk.3 \
85 string/strrchr.3 string/strsep.3 string/strspn.3 \
86 string/strstr.3 string/strtok.3 string/strxfrm.3 string/swab.3
15637ed4
RG
87
88MLINKS+=strcasecmp.3 strncasecmp.3
89MLINKS+=strcat.3 strncat.3
90MLINKS+=strcmp.3 strncmp.3
91MLINKS+=strcpy.3 strncpy.3