summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/Makefile.inc')
-rw-r--r--src/lib/libc/string/Makefile.inc172
1 files changed, 0 insertions, 172 deletions
diff --git a/src/lib/libc/string/Makefile.inc b/src/lib/libc/string/Makefile.inc
deleted file mode 100644
index 25e67e4f87..0000000000
--- a/src/lib/libc/string/Makefile.inc
+++ /dev/null
@@ -1,172 +0,0 @@
1# $OpenBSD: Makefile.inc,v 1.28 2012/01/17 02:48:01 guenther Exp $
2
3# string sources
4.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/string ${LIBCSRCDIR}/string
5
6SRCS+= bm.c memccpy.c memrchr.c stpcpy.c stpncpy.c \
7 strcasecmp.c strcasestr.c strcoll.c strdup.c \
8 strerror.c strerror_r.c strlcat.c strmode.c strndup.c strnlen.c \
9 strsignal.c strtok.c strxfrm.c \
10 wcscat.c wcschr.c wcscmp.c wcscpy.c wcscspn.c wcslcat.c wcslcpy.c \
11 wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c wcsrchr.c wcsspn.c \
12 wcsstr.c wcstok.c wcswcs.c wcswidth.c wmemchr.c wmemcmp.c wmemcpy.c \
13 wmemmove.c wmemset.c wcsdup.c \
14 timingsafe_bcmp.c wcscasecmp.c
15
16# machine-dependent net sources
17# m-d Makefile.inc must include sources for:
18# bcmp() bcopy() bzero() ffs() index() memchr() memcmp() memset()
19# rindex() strcat() strcmp() strcpy() strcspn() strlen() strlcpy()
20# strncat() strncmp() strncpy() strpbrk() strsep()
21# strspn() strstr() swav()
22# m-d Makefile.inc may include sources for:
23# memcpy() memmove() strchr() strrchr()
24
25.include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/string/Makefile.inc"
26
27# if no machine specific memmove(3), build one out of bcopy(3).
28.if empty(SRCS:Mmemmove.S)
29OBJS+= memmove.o
30memmove.o: bcopy.c
31 ${CC} -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
32 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
33 @mv ${.TARGET}.tmp ${.TARGET}
34
35memmove.go: bcopy.c
36 ${CC} -g -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
37 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
38 @mv ${.TARGET}.tmp ${.TARGET}
39
40memmove.po: bcopy.c
41 ${CC} -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
42 @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
43 @mv ${.TARGET}.tmp ${.TARGET}
44
45memmove.so: bcopy.c
46 ${CC} ${PICFLAG} -DPIC -DMEMMOVE ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
47 -o ${.TARGET}
48.endif
49
50# if no machine specific memcpy(3), build one out of bcopy(3).
51# if there is a machine specific memmove(3), we'll assume it aliases
52# memcpy(3).
53.if empty(SRCS:Mmemcpy.S)
54.if empty(SRCS:Mmemmove.S)
55OBJS+= memcpy.o
56memcpy.o: bcopy.c
57 ${CC} -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
58 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
59 @mv ${.TARGET}.tmp ${.TARGET}
60
61memcpy.go: bcopy.c
62 ${CC} -g -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
63 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
64 @mv ${.TARGET}.tmp ${.TARGET}
65
66memcpy.po: bcopy.c
67 ${CC} -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
68 @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
69 @mv ${.TARGET}.tmp ${.TARGET}
70
71memcpy.so: bcopy.c
72 ${CC} ${PICFLAG} -DPIC -DMEMCOPY ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
73 -o ${.TARGET}
74.endif
75.endif
76
77# if no machine specific strchr(3), build one out of index(3).
78.if empty(SRCS:Mstrchr.S)
79OBJS+= strchr.o
80strchr.o: index.c
81 ${CC} -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
82 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
83 @mv ${.TARGET}.tmp ${.TARGET}
84
85strchr.go: index.c
86 ${CC} -g -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
87 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
88 @mv ${.TARGET}.tmp ${.TARGET}
89
90strchr.po: index.c
91 ${CC} -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
92 @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
93 @mv ${.TARGET}.tmp ${.TARGET}
94
95strchr.so: index.c
96 ${CC} ${PICFLAG} -DPIC -DSTRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
97 -o ${.TARGET}
98.endif
99
100# if no machine specific strrchr(3), build one out of rindex(3).
101.if empty(SRCS:Mstrrchr.S)
102OBJS+= strrchr.o
103strrchr.o: rindex.c
104 ${CC} -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
105 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
106 @mv ${.TARGET}.tmp ${.TARGET}
107
108strrchr.go: rindex.c
109 ${CC} -g -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} -o ${.TARGET}
110 @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
111 @mv ${.TARGET}.tmp ${.TARGET}
112
113strrchr.po: rindex.c
114 ${CC} -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c -p ${.ALLSRC} -o ${.TARGET}
115 @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
116 @mv ${.TARGET}.tmp ${.TARGET}
117
118strrchr.so: rindex.c
119 ${CC} ${PICFLAG} -DPIC -DSTRRCHR ${CFLAGS} ${CPPFLAGS} -c ${.ALLSRC} \
120 -o ${.TARGET}
121.endif
122
123# build .ln files for memmove, memcpy, strchr and strrchr always from
124# bcopy, index, and rindex
125LOBJS+= memmove.ln memcpy.ln strchr.ln strrchr.ln
126
127memmove.ln: bcopy.c
128 lint ${LINTFLAGS} -DMEMMOVE ${CFLAGS:M-[IDU]*} -i -o ${.TARGET} \
129 ${LIBCSRCDIR}/string/bcopy.c
130
131memcpy.ln: bcopy.c
132 lint ${LINTFLAGS} -DMEMCOPY ${CFLAGS:M-[IDU]*} -i -o ${.TARGET} \
133 ${LIBCSRCDIR}/string/bcopy.c
134
135strchr.ln: index.c
136 lint ${LINTFLAGS} -DSTRCHR ${CFLAGS:M-[IDU]*} -i -o ${.TARGET} \
137 ${LIBCSRCDIR}/string/index.c
138
139strrchr.ln: rindex.c
140 lint ${LINTFLAGS} -DSTRRCHR ${CFLAGS:M-[IDU]*} -i -o ${.TARGET} \
141 ${LIBCSRCDIR}/string/rindex.c
142
143MAN+= bm.3 bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 memccpy.3 memchr.3 \
144 memcmp.3 memcpy.3 memmove.3 memset.3 stpcpy.3 strcasecmp.3 strcat.3 \
145 strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strerror.3 \
146 string.3 strlen.3 strmode.3 strdup.3 strpbrk.3 strrchr.3 strsep.3 \
147 strsignal.3 strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 strlcpy.3 \
148 wcscasecmp.3 wcscat.3 wcschr.3 wcscmp.3 wcscpy.3 wcscspn.3 wcsdup.3 \
149 wcslcpy.3 wcslen.3 wcspbrk.3 wcsrchr.3 wcsspn.3 wcsstr.3 wcstok.3 \
150 wcswidth.3 wmemchr.3 wmemcmp.3 wmemcpy.3 wmemmove.3 wmemset.3
151
152MLINKS+=bm.3 bm_comp.3 bm.3 bm_exec.3 bm.3 bm_free.3
153MLINKS+=memchr.3 memrchr.3
154MLINKS+=stpcpy.3 stpncpy.3
155MLINKS+=strchr.3 index.3
156MLINKS+=strrchr.3 rindex.3
157MLINKS+=strcasecmp.3 strncasecmp.3
158MLINKS+=strcat.3 strncat.3
159MLINKS+=strcmp.3 strncmp.3
160MLINKS+=strcpy.3 strncpy.3
161MLINKS+=strdup.3 strndup.3
162MLINKS+=strlcpy.3 strlcat.3
163MLINKS+=strlen.3 strnlen.3
164MLINKS+=strstr.3 strcasestr.3
165MLINKS+=strtok.3 strtok_r.3
166MLINKS+=strerror.3 strerror_r.3
167MLINKS+=wcscasecmp.3 wcsncasecmp.3
168MLINKS+=wcscat.3 wcsncat.3
169MLINKS+=wcscmp.3 wcsncmp.3
170MLINKS+=wcscpy.3 wcsncpy.3
171MLINKS+=wcslcpy.3 wcslcat.3
172MLINKS+=bcmp.3 timingsafe_bcmp.3