Print this page
11528 Makefile.noget can get gone
11529 Use -Wno-maybe-initialized
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libsqlite/Makefile.com
+++ new/usr/src/lib/libsqlite/Makefile.com
1 1 #
2 2 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3 3 # Use is subject to license terms.
4 4 # Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
5 5 # Copyright 2016 Nexenta Systems, Inc. All rights reserved.
6 6 # Copyright (c) 2019, Joyent, Inc.
7 7 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
8 8 #
9 9
10 10 # Make the SO name unlikely to conflict with any other
11 11 # libsqlite that might also be found on the system.
12 12 LIBRARY = libsqlite-sys.a
13 13
14 14 VERS = .2.8.15
15 15 OBJECTS = \
16 16 attach.o \
17 17 auth.o \
18 18 btree.o \
19 19 btree_rb.o \
20 20 build.o \
21 21 copy.o \
22 22 date.o \
23 23 delete.o \
24 24 encode.o \
25 25 expr.o \
26 26 func.o \
27 27 hash.o \
28 28 insert.o \
29 29 main.o \
30 30 opcodes.o \
31 31 os.o \
32 32 pager.o \
33 33 parse.o \
34 34 pragma.o \
35 35 printf.o \
36 36 random.o \
37 37 select.o \
38 38 table.o \
39 39 tokenize.o \
40 40 trigger.o \
41 41 update.o \
42 42 util.o \
43 43 vacuum.o \
44 44 vdbe.o \
45 45 vdbeaux.o \
46 46 where.o
47 47
48 48 include $(SRC)/lib/Makefile.lib
49 49
50 50 # install this library in the root filesystem
51 51 include $(SRC)/lib/Makefile.rootfs
52 52
53 53 SRCDIR = ../src
54 54 TOOLDIR = ../tool
55 55 $(DYNLIB) := LDLIBS += -lc
56 56 LIBS = $(DYNLIB) $(LINTLIB) $(NATIVERELOC)
57 57
58 58 $(LINTLIB) := SRCS = ../$(LINTSRC)
59 59
60 60 # generated sources
61 61 GENSRC = opcodes.c parse.c
62 62
63 63 # all sources
64 64 SRCS = \
65 65 $(GENSRC) \
66 66 $(SRCDIR)/attach.c \
67 67 $(SRCDIR)/auth.c \
68 68 $(SRCDIR)/btree.c \
69 69 $(SRCDIR)/btree_rb.c \
70 70 $(SRCDIR)/build.c \
71 71 $(SRCDIR)/copy.c \
72 72 $(SRCDIR)/date.c \
73 73 $(SRCDIR)/delete.c \
74 74 $(SRCDIR)/encode.c \
75 75 $(SRCDIR)/expr.c \
76 76 $(SRCDIR)/func.c \
77 77 $(SRCDIR)/hash.c \
78 78 $(SRCDIR)/insert.c \
79 79 $(SRCDIR)/main.c \
80 80 $(SRCDIR)/os.c \
81 81 $(SRCDIR)/pager.c \
82 82 $(SRCDIR)/pragma.c \
83 83 $(SRCDIR)/printf.c \
84 84 $(SRCDIR)/random.c \
85 85 $(SRCDIR)/select.c \
86 86 $(SRCDIR)/table.c \
87 87 $(SRCDIR)/tokenize.c \
88 88 $(SRCDIR)/update.c \
89 89 $(SRCDIR)/util.c \
↓ open down ↓ |
89 lines elided |
↑ open up ↑ |
90 90 $(SRCDIR)/vacuum.c \
91 91 $(SRCDIR)/vdbe.c \
92 92 $(SRCDIR)/vdbeaux.c \
93 93 $(SRCDIR)/where.c \
94 94 $(SRCDIR)/trigger.c
95 95
96 96 MYCPPFLAGS = -D_REENTRANT -DTHREADSAFE=1 -DHAVE_USLEEP=1 -I. -I.. -I$(SRCDIR)
97 97 CPPFLAGS += $(MYCPPFLAGS)
98 98
99 99 CERRWARN += -_gcc=-Wno-implicit-function-declaration
100 -CERRWARN += -_gcc=-Wno-uninitialized
100 +CERRWARN += $(CNOWARN_UNINIT)
101 101 CERRWARN += -_gcc=-Wno-unused-function
102 102 CERRWARN += -_gcc=-Wno-unused-label
103 103
104 104 # not linted
105 105 SMATCH=off
106 106
107 107 MAPFILES = ../mapfile-sqlite
108 108
109 109 # headers generated here
110 110 GENHDR = opcodes.h parse.h
111 111
112 112 # Header files used by all library source files.
113 113 #
114 114 HDR = \
115 115 $(GENHDR) \
116 116 $(SRCDIR)/btree.h \
117 117 $(SRCDIR)/config.h \
118 118 $(SRCDIR)/hash.h \
119 119 $(SRCDIR)/os.h \
120 120 ../sqlite.h \
121 121 $(SRCDIR)/sqliteInt.h \
122 122 $(SRCDIR)/vdbe.h \
123 123 $(SRCDIR)/vdbeInt.h
124 124
125 125 #
126 126 # Sources used for test harness
127 127 #
128 128 TESTSRC = \
129 129 $(SRCDIR)/tclsqlite.c \
130 130 $(SRCDIR)/btree.c \
131 131 $(SRCDIR)/func.c \
132 132 $(SRCDIR)/os.c \
133 133 $(SRCDIR)/pager.c \
134 134 $(SRCDIR)/test1.c \
135 135 $(SRCDIR)/test2.c \
136 136 $(SRCDIR)/test3.c \
137 137 $(SRCDIR)/md5.c
138 138
139 139 TESTOBJS = $(TESTSRC:$(SRCDIR)/%.c=%.o)
140 140
141 141 TESTCLEAN = $(TESTOBJS) test.db test.tcl test1.bt test2.db testdb
142 142
143 143 #
144 144 # Native variant (needed by cmd/configd)
145 145 #
146 146 NATIVERELOC = libsqlite-native.o
147 147 NATIVEPROGS = testfixture
148 148 NATIVEOBJS = $(OBJS:%.o=%-native.o)
149 149
150 150 NATIVETARGETS = $(NATIVEPROGS) $(NATIVEOBJS) $(NATIVERELOC)
151 151
152 152 $(NATIVETARGETS) := CC = $(NATIVECC)
153 153 $(NATIVETARGETS) := LD = $(NATIVELD)
154 154 $(NATIVETARGETS) := CFLAGS = $(NATIVE_CFLAGS)
155 155 $(NATIVETARGETS) := CPPFLAGS = $(MYCPPFLAGS)
156 156 $(NATIVETARGETS) := LDFLAGS =
157 157 $(NATIVETARGETS) := LDLIBS = -lc
158 158
159 159 $(OBJS) := CFLAGS += $(CTF_FLAGS)
160 160 $(OBJS) := CTFCONVERT_POST = $(CTFCONVERT_O)
161 161 $(NATIVEOBJS) := CFLAGS += $(CTF_FLAGS)
162 162 $(NATIVEOBJS) := CTFCONVERT_POST = $(CTFCONVERT_O)
163 163
164 164 TCLBASE = /usr/sfw
165 165 TCLVERS = tcl8.3
166 166
167 167 testfixture := MYCPPFLAGS += -I$(TCLBASE)/include -DTCLSH -DSQLITE_TEST=1
168 168 #
169 169 # work around compiler issues
170 170 #
171 171 testfixture := CFLAGS += \
172 172 -erroff=E_ARRAY_OF_INCOMPLETE \
173 173 -erroff=E_ARG_INCOMPATIBLE_WITH_ARG
174 174
175 175 testfixture := LDLIBS += -R$(TCLBASE)/lib -L$(TCLBASE)/lib -l$(TCLVERS) -lm -ldl
176 176
177 177 CLEANFILES += \
178 178 $(NATIVETARGETS) \
179 179 $(TESTCLEAN) \
180 180 lemon \
181 181 lemon.o \
182 182 lempar.c \
183 183 opcodes.c \
184 184 opcodes.h \
185 185 parse_tmp.c \
186 186 parse_tmp.h \
187 187 parse_tmp.out \
188 188 parse_tmp.y \
189 189 parse.c \
190 190 parse.h
191 191
192 192 ENCODING = ISO8859
193 193
194 194
195 195 .PARALLEL: $(OBJS) $(OBJS:%.o=%-native.o)
196 196 .KEEP_STATE:
197 197
198 198 # This is the default Makefile target. The objects listed here
199 199 # are what get build when you type just "make" with no arguments.
200 200 #
201 201 all: $(LIBS)
202 202 install: all \
203 203 $(ROOTLIBDIR)/$(DYNLIB) \
204 204 $(ROOTLIBDIR)/$(NATIVERELOC)
205 205
206 206 lint:
207 207
208 208 all_h: $(GENHDR)
209 209
210 210 $(ROOTLIBDIR)/$(NATIVERELOC) := FILEMODE= 644
211 211 $(ROOTLINTDIR)/$(LINTLIB) := FILEMODE= 644
212 212
213 213 $(ROOTLINK): $(ROOTLIBDIR) $(ROOTLIBDIR)/$(DYNLIB)
214 214 $(INS.liblink)
215 215
216 216 $(ROOTLINTDIR)/%: ../%
217 217 $(INS.file)
218 218
219 219 native: $(NATIVERELOC)
220 220
221 221 $(NATIVERELOC): objs .WAIT $(OBJS:%.o=%-native.o)
222 222 $(LD) -r -o $(NATIVERELOC) $(OBJS:%.o=%-native.o)
223 223
224 224 opcodes.h: $(SRCDIR)/vdbe.c
225 225 @echo "Generating $@"; \
226 226 $(RM) -f $@ ; \
227 227 echo '/* Automatically generated file. Do not edit */' > $@ ; \
228 228 grep '^case OP_' $(SRCDIR)/vdbe.c | \
229 229 sed -e 's/://' | \
230 230 $(AWK) '{printf "#define %-30s %3d\n", $$2, ++cnt}' >> $@
231 231
232 232 opcodes.c: $(SRCDIR)/vdbe.c
233 233 @echo "Generating $@"; \
234 234 $(RM) -f $@ ; \
235 235 echo '/* Automatically generated file. Do not edit */' > $@ ; \
236 236 echo 'char *sqliteOpcodeNames[] = { "???", ' >> $@ ; \
237 237 grep '^case OP_' $(SRCDIR)/vdbe.c | \
238 238 sed -e 's/^.*OP_/ "/' -e 's/:.*$$/", /' >> $@ ; \
239 239 echo '};' >> $@
240 240
241 241 testfixture: FRC
242 242 @if [ -f $(TCLBASE)/include/tcl.h ]; then \
243 243 unset SUNPRO_DEPENDENCIES; \
244 244 echo $(LINK.c) -o testfixture $(TESTSRC) $(LIBRARY) $(LDLIBS) ;\
245 245 exec $(LINK.c) -o testfixture $(TESTSRC) $(LIBRARY) $(LDLIBS) ;\
246 246 else \
247 247 echo "$(TCLBASE)/include/tcl.h: not found."; \
248 248 exit 1; \
249 249 fi
250 250
251 251 # Prevent Makefile.lib $(PICS) := from adding PICFLAGS
252 252 # by building lemon in a recursive make invocation.
253 253 # Otherwise, this target causes a rebuild every time after
254 254 # the PICS target builds this one way, then lint the other.
255 255 parse.h parse.c : $(SRCDIR)/parse.y $(TOOLDIR)/lemon.c $(TOOLDIR)/lempar.c
256 256 -$(RM) parse_tmp.y lempar.c
257 257 $(CP) $(SRCDIR)/parse.y parse_tmp.y
258 258 $(CP) $(TOOLDIR)/lempar.c lempar.c
259 259 $(MAKE) lemon
260 260 ./lemon parse_tmp.y
261 261 -$(RM) parse.c parse.h
262 262 $(CP) parse_tmp.h parse.h
263 263 $(CP) parse_tmp.c parse.c
264 264
265 265 lemon: $(TOOLDIR)/lemon.c
266 266 $(NATIVECC) $(NATIVE_CFLAGS) -o $@ $(TOOLDIR)/lemon.c
267 267
268 268 objs/%-native.o: $(SRCDIR)/%.c $(GENHDR)
269 269 $(COMPILE.c) -o $@ $<
270 270 $(POST_PROCESS_O)
271 271
272 272 objs/%-native.o: %.c $(GENHDR)
273 273 $(COMPILE.c) -o $@ $<
274 274 $(POST_PROCESS_O)
275 275
276 276 objs/parse-native.o: parse.c $(GENHDR)
277 277 $(COMPILE.c) -o $@ parse.c
278 278 $(POST_PROCESS_O)
279 279
280 280 objs/%.o pics/%.o: $(SRCDIR)/%.c $(GENHDR)
281 281 $(COMPILE.c) -o $@ $<
282 282 $(POST_PROCESS_O)
283 283
284 284 objs/%.o pics/%.o: %.c $(GENHDR)
285 285 $(COMPILE.c) -o $@ $<
286 286 $(POST_PROCESS_O)
287 287
288 288 # need direct rules for generated files
289 289 objs/opcodes.o pics/opcodes.o: opcodes.c $(GENHDR)
290 290 $(COMPILE.c) -o $@ opcodes.c
291 291 $(POST_PROCESS_O)
292 292
293 293 objs/parse.o pics/parse.o: parse.c $(GENHDR)
294 294 $(COMPILE.c) -o $@ parse.c
295 295 $(POST_PROCESS_O)
296 296
297 297 include $(SRC)/lib/Makefile.targ
298 298
299 299 FRC:
↓ open down ↓ |
189 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX