Print this page
11506 smatch resync
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/boot/lib/libstand/Makefile.inc
+++ new/usr/src/boot/lib/libstand/Makefile.inc
1 1 #
2 2 # This file and its contents are supplied under the terms of the
3 3 # Common Development and Distribution License ("CDDL"), version 1.0.
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
4 4 # You may only use this file in accordance with the terms of version
5 5 # 1.0 of the CDDL.
6 6 #
7 7 # A full copy of the text of the CDDL should have accompanied this
8 8 # source. A copy of the CDDL is also available via the Internet at
9 9 # http://www.illumos.org/license/CDDL.
10 10 #
11 11
12 12 #
13 13 # Copyright 2016 Toomas Soome <tsoome@me.com>
14 +# Copyright 2019 Joyent, Inc.
14 15 #
15 16
16 17 #
17 18 # Notes:
18 19 # - We don't use the libc strerror/sys_errlist because the string table is
19 20 # quite large.
20 21 #
21 22
22 23 # standalone components and stuff we have modified locally
23 24 SRCS= $(ZLIB)/gzguts.h $(ZLIB)/zutil.h
24 25 SRCS += $(SASRC)/__main.c $(SASRC)/assert.c
25 26 SRCS += $(SASRC)/bcd.c $(SASRC)/environment.c
26 27 SRCS += $(SASRC)/getopt.c $(SASRC)/strtol.c
27 28 SRCS += $(SASRC)/strtoul.c $(SASRC)/random.c
28 29 SRCS += $(SASRC)/sbrk.c $(SASRC)/twiddle.c
29 30 SRCS += $(SASRC)/zalloc.c $(SASRC)/zalloc_malloc.c
30 31
31 32 OBJS= __main.o assert.o bcd.o environment.o \
32 33 getopt.o gets.o globals.o pager.o panic.o printf.o \
33 34 strdup.o strerror.o strtol.o strtoul.o random.o \
34 35 sbrk.o twiddle.o zalloc.o zalloc_malloc.o
35 36
36 37 # private (pruned) versions of libc string functions
37 38 SRCS += $(SASRC)/strcasecmp.c
38 39 OBJS += strcasecmp.o
39 40
40 41 # from libc
41 42 SRCS += $(LIBSRC)/libc/net/ntoh.c
42 43 OBJS += ntoh.o
43 44
44 45 # string functions from libc
45 46 SRCS += $(LIBSRC)/libc/string/bcmp.c $(LIBSRC)/libc/string/bcopy.c
46 47 SRCS += $(LIBSRC)/libc/string/bzero.c $(LIBSRC)/libc/string/ffs.c
47 48 SRCS += $(LIBSRC)/libc/string/fls.c $(LIBSRC)/libc/string/memccpy.c
48 49 SRCS += $(LIBSRC)/libc/string/memchr.c $(LIBSRC)/libc/string/memcmp.c
49 50 SRCS += $(LIBSRC)/libc/string/memcpy.c $(LIBSRC)/libc/string/memmove.c
50 51 SRCS += $(LIBSRC)/libc/string/memset.c $(LIBSRC)/libc/string/strcat.c
51 52 SRCS += $(LIBSRC)/libc/string/strchr.c $(LIBSRC)/libc/string/strcmp.c
52 53 SRCS += $(LIBSRC)/libc/string/strcpy.c $(LIBSRC)/libc/string/stpcpy.c
53 54 SRCS += $(LIBSRC)/libc/string/stpncpy.c $(LIBSRC)/libc/string/strcspn.c
54 55 SRCS += $(LIBSRC)/libc/string/strlcat.c $(LIBSRC)/libc/string/strlcpy.c
55 56 SRCS += $(LIBSRC)/libc/string/strlen.c $(LIBSRC)/libc/string/strncat.c
56 57 SRCS += $(LIBSRC)/libc/string/strncmp.c $(LIBSRC)/libc/string/strncpy.c
57 58 SRCS += $(LIBSRC)/libc/string/strpbrk.c $(LIBSRC)/libc/string/strrchr.c
58 59 SRCS += $(LIBSRC)/libc/string/strsep.c $(LIBSRC)/libc/string/strspn.c
59 60 SRCS += $(LIBSRC)/libc/string/strstr.c $(LIBSRC)/libc/string/strtok.c
60 61 SRCS += $(LIBSRC)/libc/string/swab.c
61 62
62 63 SRCS += $(SASRC)/qdivrem.c
63 64
64 65 OBJS += bcmp.o bcopy.o bzero.o ffs.o fls.o \
65 66 memccpy.o memchr.o memcmp.o memcpy.o memmove.o memset.o \
66 67 qdivrem.o strcat.o strchr.o strcmp.o strcpy.o stpcpy.o stpncpy.o \
67 68 strcspn.o strlcat.o strlcpy.o strlen.o strncat.o strncmp.o strncpy.o \
68 69 strpbrk.o strrchr.o strsep.o strspn.o strstr.o strtok.o swab.o
69 70
70 71 # uuid functions from libc
71 72 SRCS += $(LIBSRC)/libc/uuid/uuid_create_nil.c
72 73 SRCS += $(LIBSRC)/libc/uuid/uuid_equal.c
73 74 SRCS += $(LIBSRC)/libc/uuid/uuid_is_nil.c
74 75
75 76 SRCS += $(SASRC)/uuid_from_string.c
76 77 SRCS += $(SASRC)/uuid_to_string.c
77 78
↓ open down ↓ |
54 lines elided |
↑ open up ↑ |
78 79 OBJS += uuid_create_nil.o uuid_equal.o uuid_from_string.o uuid_is_nil.o \
79 80 uuid_to_string.o
80 81
81 82 # decompression functionality from libbz2
82 83 # NOTE: to actually test this functionality after libbz2 upgrade compile
83 84 # loader(8) with LOADER_BZIP2_SUPPORT defined
84 85 _bzlib.o _crctable.o _decompress.o _huffman.o _randtable.o bzipfs.o \
85 86 := CFLAGS += -DBZ_LOADER -DBZ_NO_STDIO -DBZ_NO_COMPRESS
86 87 SRCS += libstand_bzlib_private.h
87 88
89 +# too hairy
90 +_inflate.o := SMATCH=off
91 +
88 92 SRCS += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
89 93 OBJS += _bzlib.o _crctable.o _decompress.o _huffman.o _randtable.o
90 94 CLEANFILES += _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c
91 95
92 96 _bzlib.c: $(SRC)/common/bzip2/bzlib.c
93 97 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
94 98
95 99 _crctable.c: $(SRC)/common/bzip2/crctable.c
96 100 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
97 101
98 102 _decompress.c: $(SRC)/common/bzip2/decompress.c
99 103 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
100 104
101 105 _huffman.c: $(SRC)/common/bzip2/huffman.c
102 106 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
103 107
104 108 _randtable.c: $(SRC)/common/bzip2/randtable.c
105 109 sed "s|bzlib_private\.h|libstand_bzlib_private.h|" $^ > $@
106 110
107 111 CLEANFILES += libstand_bzlib_private.h
108 112 libstand_bzlib_private.h: $(SRC)/common/bzip2/bzlib_private.h
109 113 sed -e 's|<stdlib.h>|"stand.h"|' $^ > $@
110 114
111 115 # decompression functionality from zlib
112 116 adler32.o crc32.o _infback.o _inffast.o _inflate.o _inftrees.o _zutil.o \
113 117 gzipfs.o gzip.o := CPPFLAGS += -I$(ZLIB)
114 118 SRCS += $(ZLIB)/adler32.c $(ZLIB)/crc32.c \
115 119 libstand_zutil.h libstand_gzguts.h
116 120 OBJS += adler32.o crc32.o
117 121
118 122 _infback.c: $(ZLIB)/infback.c
119 123 sed -e "s|zutil\.h|libstand_zutil.h|" \
120 124 -e "s|gzguts\.h|libstand_gzguts.h|" \
121 125 $^ > $@
122 126 _inffast.c: $(ZLIB)/inffast.c
123 127 sed -e "s|zutil\.h|libstand_zutil.h|" \
124 128 -e "s|gzguts\.h|libstand_gzguts.h|" \
125 129 $^ > $@
126 130 _inflate.c: $(ZLIB)/inflate.c
127 131 sed -e "s|zutil\.h|libstand_zutil.h|" \
128 132 -e "s|gzguts\.h|libstand_gzguts.h|" \
129 133 $^ > $@
130 134 _inftrees.c: $(ZLIB)/inftrees.c
131 135 sed -e "s|zutil\.h|libstand_zutil.h|" \
132 136 -e "s|gzguts\.h|libstand_gzguts.h|" \
133 137 $^ > $@
134 138 _zutil.c: $(ZLIB)/zutil.c
135 139 sed -e "s|zutil\.h|libstand_zutil.h|" \
136 140 -e "s|gzguts\.h|libstand_gzguts.h|" \
137 141 $^ > $@
138 142
139 143 SRCS += _infback.c _inffast.c _inflate.c _inftrees.c _zutil.c
140 144 OBJS += _infback.o _inffast.o _inflate.o _inftrees.o _zutil.o
141 145 CLEANFILES += _infback.c _inffast.c _inflate.c _inftrees.c _zutil.c
142 146
143 147 # depend on stand.h being able to be included multiple times
144 148 libstand_zutil.h: $(ZLIB)/zutil.h
145 149 sed -e 's|<fcntl.h>|"stand.h"|' \
146 150 -e 's|<stddef.h>|"stand.h"|' \
147 151 -e 's|<string.h>|"stand.h"|' \
148 152 -e 's|<stdio.h>|"stand.h"|' \
149 153 -e 's|<stdlib.h>|"stand.h"|' \
150 154 $^ > $@
151 155
152 156 libstand_gzguts.h: $(ZLIB)/gzguts.h
153 157 sed -e 's|<fcntl.h>|"stand.h"|' \
154 158 -e 's|<stddef.h>|"stand.h"|' \
155 159 -e 's|<string.h>|"stand.h"|' \
156 160 -e 's|<stdio.h>|"stand.h"|' \
157 161 -e 's|<stdlib.h>|"stand.h"|' \
158 162 $^ > $@
159 163
160 164 CLEANFILES += libstand_zutil.h libstand_gzguts.h
161 165
162 166 # io routines
163 167 SRCS += $(SASRC)/closeall.c $(SASRC)/dev.c \
164 168 $(SASRC)/ioctl.c $(SASRC)/nullfs.c \
165 169 $(SASRC)/stat.c $(SASRC)/fstat.c $(SASRC)/close.c \
166 170 $(SASRC)/lseek.c $(SASRC)/open.c $(SASRC)/read.c \
167 171 $(SASRC)/write.c $(SASRC)/readdir.c
168 172
169 173 OBJS += closeall.o dev.o ioctl.o nullfs.o stat.o fstat.o close.o lseek.o \
170 174 open.o read.o write.o readdir.o
171 175
172 176 # network routines
173 177 SRCS += $(SASRC)/arp.c $(SASRC)/ether.c $(SASRC)/ip.c \
174 178 $(SASRC)/inet_ntoa.c $(SASRC)/in_cksum.c \
175 179 $(SASRC)/net.c $(SASRC)/udp.c $(SASRC)/netif.c \
176 180 $(SASRC)/rpc.c
177 181 OBJS += arp.o ether.o ip.o inet_ntoa.o in_cksum.o net.o udp.o netif.o rpc.o
178 182
179 183 # network info services:
180 184 SRCS += $(SASRC)/bootp.c $(SASRC)/rarp.c \
181 185 $(SASRC)/bootparam.c
182 186 OBJS += bootp.o rarp.o bootparam.o
183 187
184 188 # boot filesystems
185 189 SRCS += $(SASRC)/ufs.c
186 190 SRCS += $(SASRC)/nfs.c
187 191 SRCS += $(SASRC)/cd9660.c
188 192 SRCS += $(SASRC)/tftp.c
189 193 SRCS += $(SASRC)/gzipfs.c
190 194 SRCS += $(SASRC)/bzipfs.c
191 195 SRCS += $(SASRC)/dosfs.c
192 196 OBJS += ufs.o
193 197 OBJS += nfs.o
194 198 OBJS += cd9660.o
195 199 OBJS += tftp.o
196 200 OBJS += gzipfs.o
197 201 OBJS += bzipfs.o
198 202 OBJS += dosfs.o
199 203 #
200 204 .PARALLEL:
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX