~ubuntu-branches/ubuntu/maverick/sqlite3/maverick-updates

« back to all changes in this revision

Viewing changes to Makefile.in.orig

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2008-10-01 20:16:18 UTC
  • mfrom: (3.1.20 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081001201618-yfvqqj1qs29wdtcc
Tags: 3.5.9-5
Backport fix for distinct on indexes (closes: #500792).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/make
 
2
#
 
3
# Makefile for SQLITE
 
4
#
 
5
# This makefile is suppose to be configured automatically using the
 
6
# autoconf.  But if that does not work for you, you can configure
 
7
# the makefile manually.  Just set the parameters below to values that
 
8
# work well for your system.
 
9
#
 
10
# If the configure script does not work out-of-the-box, you might
 
11
# be able to get it to work by giving it some hints.  See the comment
 
12
# at the beginning of configure.in for additional information.
 
13
#
 
14
 
 
15
# The toplevel directory of the source tree.  This is the directory
 
16
# that contains this "Makefile.in" and the "configure.in" script.
 
17
#
 
18
TOP = @srcdir@
 
19
 
 
20
# C Compiler and options for use in building executables that
 
21
# will run on the platform that is doing the build.
 
22
#
 
23
BCC = @BUILD_CC@ @BUILD_CFLAGS@
 
24
 
 
25
# C Compile and options for use in building executables that 
 
26
# will run on the target platform.  (BCC and TCC are usually the
 
27
# same unless your are cross-compiling.)
 
28
#
 
29
TCC = @CC@ @CFLAGS@ -I. -I${TOP}/src
 
30
 
 
31
# Define -DNDEBUG to compile without debugging (i.e., for production usage)
 
32
# Omitting the define will cause extra debugging code to be inserted and
 
33
# includes extra comments when "EXPLAIN stmt" is used.
 
34
#
 
35
TCC += @TARGET_DEBUG@ @XTHREADCONNECT@
 
36
 
 
37
# Compiler options needed for programs that use the TCL library.
 
38
#
 
39
TCC += @TCL_INCLUDE_SPEC@
 
40
 
 
41
# The library that programs using TCL must link against.
 
42
#
 
43
LIBTCL = @TCL_LIB_SPEC@ @TCL_LIBS@
 
44
 
 
45
# Compiler options needed for programs that use the readline() library.
 
46
#
 
47
READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@
 
48
 
 
49
# The library that programs using readline() must link against.
 
50
#
 
51
LIBREADLINE = @TARGET_READLINE_LIBS@
 
52
 
 
53
# Should the database engine be compiled threadsafe
 
54
#
 
55
TCC += -DSQLITE_THREADSAFE=@SQLITE_THREADSAFE@
 
56
 
 
57
# The pthreads library if needed
 
58
#
 
59
LIBPTHREAD=@TARGET_THREAD_LIB@
 
60
 
 
61
# Do threads override each others locks by default (1), or do we test (-1)
 
62
#
 
63
TCC += -DSQLITE_THREAD_OVERRIDE_LOCK=@THREADSOVERRIDELOCKS@
 
64
 
 
65
# The fdatasync library
 
66
TLIBS = @LIBS@
 
67
 
 
68
# Flags controlling use of the in memory btree implementation
 
69
#
 
70
# TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
 
71
# default to file, 2 to default to memory, and 3 to force temporary
 
72
# tables to always be in memory.
 
73
#
 
74
TEMP_STORE = -DTEMP_STORE=@TEMP_STORE@
 
75
 
 
76
# Version numbers and release number for the SQLite being compiled.
 
77
#
 
78
VERSION = @VERSION@
 
79
VERSION_NUMBER = @VERSION_NUMBER@
 
80
RELEASE = @RELEASE@
 
81
 
 
82
# Filename extensions
 
83
#
 
84
BEXE = @BUILD_EXEEXT@
 
85
TEXE = @TARGET_EXEEXT@
 
86
 
 
87
# The following variable is "1" if the configure script was able to locate
 
88
# the tclConfig.sh file.  It is an empty string otherwise.  When this
 
89
# variable is "1", the TCL extension library (libtclsqlite3.so) is built
 
90
# and installed.
 
91
#
 
92
HAVE_TCL = @HAVE_TCL@
 
93
 
 
94
# The suffix used on shared libraries.  Ex:  ".dll", ".so", ".dylib"
 
95
#
 
96
SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
 
97
 
 
98
# The directory into which to store package information for
 
99
 
 
100
# Some standard variables and programs
 
101
#
 
102
prefix = @prefix@
 
103
exec_prefix = @exec_prefix@
 
104
libdir = @libdir@
 
105
INSTALL = @INSTALL@
 
106
LIBTOOL = ./libtool
 
107
ALLOWRELEASE = @ALLOWRELEASE@
 
108
 
 
109
# libtool compile/link/install
 
110
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC)
 
111
LTLINK = $(LIBTOOL) --mode=link $(TCC) @LDFLAGS@
 
112
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
 
113
 
 
114
# nawk compatible awk.
 
115
NAWK = @AWK@
 
116
 
 
117
# You should not have to change anything below this line
 
118
###############################################################################
 
119
TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
 
120
 
 
121
# Object files for the SQLite library.
 
122
#
 
123
LIBOBJ = alter.lo analyze.lo attach.lo auth.lo btmutex.lo btree.lo build.lo \
 
124
         callback.lo complete.lo date.lo \
 
125
         delete.lo expr.lo func.lo hash.lo journal.lo insert.lo loadext.lo \
 
126
         main.lo malloc.lo mem1.lo mem2.lo mem3.lo mem4.lo mutex.lo \
 
127
         mutex_os2.lo mutex_unix.lo mutex_w32.lo \
 
128
         opcodes.lo os.lo os_unix.lo os_win.lo os_os2.lo \
 
129
         pager.lo parse.lo pragma.lo prepare.lo printf.lo random.lo \
 
130
         select.lo table.lo tokenize.lo trigger.lo update.lo \
 
131
         util.lo vacuum.lo \
 
132
         vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbefifo.lo vdbemem.lo \
 
133
         where.lo utf.lo legacy.lo vtab.lo
 
134
 
 
135
# All of the source code files.
 
136
#
 
137
SRC = \
 
138
  $(TOP)/src/alter.c \
 
139
  $(TOP)/src/analyze.c \
 
140
  $(TOP)/src/attach.c \
 
141
  $(TOP)/src/auth.c \
 
142
  $(TOP)/src/btmutex.c \
 
143
  $(TOP)/src/btree.c \
 
144
  $(TOP)/src/btree.h \
 
145
  $(TOP)/src/build.c \
 
146
  $(TOP)/src/callback.c \
 
147
  $(TOP)/src/complete.c \
 
148
  $(TOP)/src/date.c \
 
149
  $(TOP)/src/delete.c \
 
150
  $(TOP)/src/expr.c \
 
151
  $(TOP)/src/func.c \
 
152
  $(TOP)/src/hash.c \
 
153
  $(TOP)/src/hash.h \
 
154
  $(TOP)/src/insert.c \
 
155
  $(TOP)/src/journal.c \
 
156
  $(TOP)/src/legacy.c \
 
157
  $(TOP)/src/loadext.c \
 
158
  $(TOP)/src/main.c \
 
159
  $(TOP)/src/malloc.c \
 
160
  $(TOP)/src/mem1.c \
 
161
  $(TOP)/src/mem2.c \
 
162
  $(TOP)/src/mem3.c \
 
163
  $(TOP)/src/mem4.c \
 
164
  $(TOP)/src/mutex.c \
 
165
  $(TOP)/src/mutex_os2.c \
 
166
  $(TOP)/src/mutex_unix.c \
 
167
  $(TOP)/src/mutex_w32.c \
 
168
  $(TOP)/src/os.c \
 
169
  $(TOP)/src/os_unix.c \
 
170
  $(TOP)/src/os_win.c \
 
171
  $(TOP)/src/os_os2.c \
 
172
  $(TOP)/src/pager.c \
 
173
  $(TOP)/src/pager.h \
 
174
  $(TOP)/src/parse.y \
 
175
  $(TOP)/src/pragma.c \
 
176
  $(TOP)/src/prepare.c \
 
177
  $(TOP)/src/printf.c \
 
178
  $(TOP)/src/random.c \
 
179
  $(TOP)/src/select.c \
 
180
  $(TOP)/src/shell.c \
 
181
  $(TOP)/src/sqlite.h.in \
 
182
  $(TOP)/src/sqliteInt.h \
 
183
  $(TOP)/src/table.c \
 
184
  $(TOP)/src/tclsqlite.c \
 
185
  $(TOP)/src/tokenize.c \
 
186
  $(TOP)/src/trigger.c \
 
187
  $(TOP)/src/utf.c \
 
188
  $(TOP)/src/update.c \
 
189
  $(TOP)/src/util.c \
 
190
  $(TOP)/src/vacuum.c \
 
191
  $(TOP)/src/vdbe.c \
 
192
  $(TOP)/src/vdbe.h \
 
193
  $(TOP)/src/vdbeapi.c \
 
194
  $(TOP)/src/vdbeaux.c \
 
195
  $(TOP)/src/vdbeblob.c \
 
196
  $(TOP)/src/vdbefifo.c \
 
197
  $(TOP)/src/vdbemem.c \
 
198
  $(TOP)/src/vdbeInt.h \
 
199
  $(TOP)/src/vtab.c \
 
200
  $(TOP)/src/where.c
 
201
 
 
202
# Source code for extensions
 
203
#
 
204
SRC += \
 
205
  $(TOP)/ext/fts1/fts1.c \
 
206
  $(TOP)/ext/fts1/fts1.h \
 
207
  $(TOP)/ext/fts1/fts1_hash.c \
 
208
  $(TOP)/ext/fts1/fts1_hash.h \
 
209
  $(TOP)/ext/fts1/fts1_porter.c \
 
210
  $(TOP)/ext/fts1/fts1_tokenizer.h \
 
211
  $(TOP)/ext/fts1/fts1_tokenizer1.c
 
212
 
 
213
 
 
214
# Source code to the test files.
 
215
#
 
216
TESTSRC = \
 
217
  $(TOP)/src/attach.c \
 
218
  $(TOP)/src/btree.c \
 
219
  $(TOP)/src/build.c \
 
220
  $(TOP)/src/date.c \
 
221
  $(TOP)/src/expr.c \
 
222
  $(TOP)/src/func.c \
 
223
  $(TOP)/src/insert.c \
 
224
  $(TOP)/src/malloc.c \
 
225
  $(TOP)/src/os.c \
 
226
  $(TOP)/src/os_os2.c \
 
227
  $(TOP)/src/os_unix.c \
 
228
  $(TOP)/src/os_win.c \
 
229
  $(TOP)/src/pager.c \
 
230
  $(TOP)/src/pragma.c \
 
231
  $(TOP)/src/prepare.c \
 
232
  $(TOP)/src/printf.c \
 
233
  $(TOP)/src/select.c \
 
234
  $(TOP)/src/test1.c \
 
235
  $(TOP)/src/test2.c \
 
236
  $(TOP)/src/test3.c \
 
237
  $(TOP)/src/test4.c \
 
238
  $(TOP)/src/test5.c \
 
239
  $(TOP)/src/test6.c \
 
240
  $(TOP)/src/test7.c \
 
241
  $(TOP)/src/test8.c \
 
242
  $(TOP)/src/test9.c \
 
243
  $(TOP)/src/test_autoext.c \
 
244
  $(TOP)/src/test_async.c \
 
245
  $(TOP)/src/test_btree.c \
 
246
  $(TOP)/src/test_config.c \
 
247
  $(TOP)/src/test_hexio.c \
 
248
  $(TOP)/src/test_malloc.c \
 
249
  $(TOP)/src/test_md5.c \
 
250
  $(TOP)/src/test_onefile.c \
 
251
  $(TOP)/src/test_schema.c \
 
252
  $(TOP)/src/test_server.c \
 
253
  $(TOP)/src/test_tclvar.c \
 
254
  $(TOP)/src/test_thread.c \
 
255
  $(TOP)/src/tokenize.c \
 
256
  $(TOP)/src/utf.c \
 
257
  $(TOP)/src/util.c \
 
258
  $(TOP)/src/vdbe.c \
 
259
  $(TOP)/src/vdbeapi.c \
 
260
  $(TOP)/src/vdbeaux.c \
 
261
  $(TOP)/src/vdbemem.c \
 
262
  $(TOP)/src/where.c \
 
263
  parse.c
 
264
 
 
265
# Header files used by all library source files.
 
266
#
 
267
HDR = \
 
268
   sqlite3.h  \
 
269
   $(TOP)/src/btree.h \
 
270
   $(TOP)/src/btreeInt.h \
 
271
   $(TOP)/src/hash.h \
 
272
   $(TOP)/src/sqliteLimit.h \
 
273
   $(TOP)/src/mutex.h \
 
274
   opcodes.h \
 
275
   $(TOP)/src/os.h \
 
276
   $(TOP)/src/os_common.h \
 
277
   $(TOP)/src/sqlite3ext.h \
 
278
   $(TOP)/src/sqliteInt.h  \
 
279
   $(TOP)/src/vdbe.h \
 
280
   parse.h
 
281
 
 
282
# Header files used by extensions
 
283
#
 
284
HDR += \
 
285
  $(TOP)/ext/fts1/fts1.h \
 
286
  $(TOP)/ext/fts1/fts1_hash.h \
 
287
  $(TOP)/ext/fts1/fts1_tokenizer.h
 
288
 
 
289
# Header files used by the VDBE submodule
 
290
#
 
291
VDBEHDR = \
 
292
   $(HDR) \
 
293
   $(TOP)/src/vdbeInt.h
 
294
 
 
295
# This is the default Makefile target.  The objects listed here
 
296
# are what get build when you type just "make" with no arguments.
 
297
#
 
298
all:    sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
 
299
 
 
300
Makefile: $(TOP)/Makefile.in
 
301
        ./config.status
 
302
 
 
303
# Generate the file "last_change" which contains the date of change
 
304
# of the most recently modified source code file
 
305
#
 
306
last_change:    $(SRC)
 
307
        cat $(SRC) | grep '$$Id: ' | sort -k 5 | tail -1 \
 
308
          | $(NAWK) '{print $$5,$$6}' >last_change
 
309
 
 
310
libsqlite3.la:  $(LIBOBJ)
 
311
        $(LTLINK) -o libsqlite3.la $(LIBOBJ) $(LIBPTHREAD) \
 
312
                ${ALLOWRELEASE} -rpath $(libdir) -version-info "8:6:8"
 
313
 
 
314
libtclsqlite3.la:       tclsqlite.lo libsqlite3.la
 
315
        $(LTLINK) -o libtclsqlite3.la tclsqlite.lo \
 
316
                $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(LIBPTHREAD) \
 
317
                -rpath $(libdir)/sqlite \
 
318
                -version-info "8:6:8"
 
319
 
 
320
sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h
 
321
        $(LTLINK) $(READLINE_FLAGS) $(LIBPTHREAD) \
 
322
                -o $@ $(TOP)/src/shell.c libsqlite3.la \
 
323
                $(LIBREADLINE) $(TLIBS)
 
324
 
 
325
# This target creates a directory named "tsrc" and fills it with
 
326
# copies of all of the C source code and header files needed to
 
327
# build on the target system.  Some of the C source code and header
 
328
# files are automatically generated.  This target takes care of
 
329
# all that automatic generation.
 
330
#
 
331
target_source:  $(SRC) parse.c opcodes.c keywordhash.h $(VDBEHDR) 
 
332
        rm -rf tsrc
 
333
        mkdir -p tsrc
 
334
        cp $(SRC) $(VDBEHDR) tsrc
 
335
        rm tsrc/sqlite.h.in tsrc/parse.y
 
336
        cp parse.c opcodes.c keywordhash.h tsrc
 
337
 
 
338
sqlite3.c:      target_source $(TOP)/tool/mksqlite3c.tcl
 
339
        tclsh $(TOP)/tool/mksqlite3c.tcl
 
340
 
 
341
# Rules to build the LEMON compiler generator
 
342
#
 
343
lemon$(BEXE):   $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
 
344
        $(BCC) -o lemon$(BEXE) $(TOP)/tool/lemon.c
 
345
        cp $(TOP)/tool/lempar.c .
 
346
 
 
347
 
 
348
# Rules to build individual files
 
349
#
 
350
alter.lo:       $(TOP)/src/alter.c $(HDR)
 
351
        $(LTCOMPILE) -c $(TOP)/src/alter.c
 
352
 
 
353
analyze.lo:     $(TOP)/src/analyze.c $(HDR)
 
354
        $(LTCOMPILE) -c $(TOP)/src/analyze.c
 
355
 
 
356
attach.lo:      $(TOP)/src/attach.c $(HDR)
 
357
        $(LTCOMPILE) -c $(TOP)/src/attach.c
 
358
 
 
359
auth.lo:        $(TOP)/src/auth.c $(HDR)
 
360
        $(LTCOMPILE) -c $(TOP)/src/auth.c
 
361
 
 
362
btmutex.lo:     $(TOP)/src/btmutex.c $(HDR)
 
363
        $(LTCOMPILE) -c $(TOP)/src/btmutex.c
 
364
 
 
365
btree.lo:       $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
 
366
        $(LTCOMPILE) -c $(TOP)/src/btree.c
 
367
 
 
368
build.lo:       $(TOP)/src/build.c $(HDR)
 
369
        $(LTCOMPILE) -c $(TOP)/src/build.c
 
370
 
 
371
callback.lo:    $(TOP)/src/callback.c $(HDR)
 
372
        $(LTCOMPILE) -c $(TOP)/src/callback.c
 
373
 
 
374
complete.lo:    $(TOP)/src/complete.c $(HDR)
 
375
        $(LTCOMPILE) -c $(TOP)/src/complete.c
 
376
 
 
377
date.lo:        $(TOP)/src/date.c $(HDR)
 
378
        $(LTCOMPILE) -c $(TOP)/src/date.c
 
379
 
 
380
delete.lo:      $(TOP)/src/delete.c $(HDR)
 
381
        $(LTCOMPILE) -c $(TOP)/src/delete.c
 
382
 
 
383
expr.lo:        $(TOP)/src/expr.c $(HDR)
 
384
        $(LTCOMPILE) -c $(TOP)/src/expr.c
 
385
 
 
386
func.lo:        $(TOP)/src/func.c $(HDR)
 
387
        $(LTCOMPILE) -c $(TOP)/src/func.c
 
388
 
 
389
hash.lo:        $(TOP)/src/hash.c $(HDR)
 
390
        $(LTCOMPILE) -c $(TOP)/src/hash.c
 
391
 
 
392
insert.lo:      $(TOP)/src/insert.c $(HDR)
 
393
        $(LTCOMPILE) -c $(TOP)/src/insert.c
 
394
 
 
395
journal.lo:     $(TOP)/src/journal.c $(HDR)
 
396
        $(LTCOMPILE) -c $(TOP)/src/journal.c
 
397
 
 
398
legacy.lo:      $(TOP)/src/legacy.c $(HDR)
 
399
        $(LTCOMPILE) -c $(TOP)/src/legacy.c
 
400
 
 
401
loadext.lo:     $(TOP)/src/loadext.c $(HDR)
 
402
        $(LTCOMPILE) -c $(TOP)/src/loadext.c
 
403
 
 
404
main.lo:        $(TOP)/src/main.c $(HDR)
 
405
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/main.c
 
406
 
 
407
malloc.lo:      $(TOP)/src/malloc.c $(HDR)
 
408
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/malloc.c
 
409
 
 
410
mem1.lo:        $(TOP)/src/mem1.c $(HDR)
 
411
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem1.c
 
412
 
 
413
mem2.lo:        $(TOP)/src/mem2.c $(HDR)
 
414
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem2.c
 
415
 
 
416
mem3.lo:        $(TOP)/src/mem3.c $(HDR)
 
417
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem3.c
 
418
 
 
419
mem4.lo:        $(TOP)/src/mem4.c $(HDR)
 
420
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mem4.c
 
421
 
 
422
mutex.lo:       $(TOP)/src/mutex.c $(HDR)
 
423
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex.c
 
424
 
 
425
mutex_os2.lo:   $(TOP)/src/mutex_os2.c $(HDR)
 
426
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_os2.c
 
427
 
 
428
mutex_unix.lo:  $(TOP)/src/mutex_unix.c $(HDR)
 
429
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_unix.c
 
430
 
 
431
mutex_w32.lo:   $(TOP)/src/mutex_w32.c $(HDR)
 
432
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/mutex_w32.c
 
433
 
 
434
pager.lo:       $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
 
435
        $(LTCOMPILE) -c $(TOP)/src/pager.c
 
436
 
 
437
opcodes.lo:     opcodes.c
 
438
        $(LTCOMPILE) -c opcodes.c
 
439
 
 
440
opcodes.c:      opcodes.h $(TOP)/mkopcodec.awk
 
441
        sort -n -b -k 3 opcodes.h | $(NAWK) -f $(TOP)/mkopcodec.awk >opcodes.c
 
442
 
 
443
opcodes.h:      parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
 
444
        cat parse.h $(TOP)/src/vdbe.c | $(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
 
445
 
 
446
os.lo:  $(TOP)/src/os.c $(HDR)
 
447
        $(LTCOMPILE) -c $(TOP)/src/os.c
 
448
 
 
449
os_unix.lo:     $(TOP)/src/os_unix.c $(HDR)
 
450
        $(LTCOMPILE) -c $(TOP)/src/os_unix.c
 
451
 
 
452
os_win.lo:      $(TOP)/src/os_win.c $(HDR)
 
453
        $(LTCOMPILE) -c $(TOP)/src/os_win.c
 
454
 
 
455
os_os2.lo:      $(TOP)/src/os_os2.c $(HDR)
 
456
        $(LTCOMPILE) -c $(TOP)/src/os_os2.c
 
457
 
 
458
parse.lo:       parse.c $(HDR)
 
459
        $(LTCOMPILE) -c parse.c
 
460
 
 
461
parse.h:        parse.c
 
462
 
 
463
parse.c:        $(TOP)/src/parse.y lemon$(BEXE) $(TOP)/addopcodes.awk
 
464
        cp $(TOP)/src/parse.y .
 
465
        ./lemon$(BEXE) $(OPTS) parse.y
 
466
        mv parse.h parse.h.temp
 
467
        $(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
 
468
 
 
469
pragma.lo:      $(TOP)/src/pragma.c $(HDR)
 
470
        $(LTCOMPILE) -c $(TOP)/src/pragma.c
 
471
 
 
472
prepare.lo:     $(TOP)/src/prepare.c $(HDR)
 
473
        $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/prepare.c
 
474
 
 
475
printf.lo:      $(TOP)/src/printf.c $(HDR)
 
476
        $(LTCOMPILE) -c $(TOP)/src/printf.c
 
477
 
 
478
random.lo:      $(TOP)/src/random.c $(HDR)
 
479
        $(LTCOMPILE) -c $(TOP)/src/random.c
 
480
 
 
481
select.lo:      $(TOP)/src/select.c $(HDR)
 
482
        $(LTCOMPILE) -c $(TOP)/src/select.c
 
483
 
 
484
sqlite3.h:      $(TOP)/src/sqlite.h.in 
 
485
        sed -e s/--VERS--/$(RELEASE)/ $(TOP)/src/sqlite.h.in | \
 
486
        sed -e s/--VERSION-NUMBER--/$(VERSION_NUMBER)/ >sqlite3.h
 
487
 
 
488
table.lo:       $(TOP)/src/table.c $(HDR)
 
489
        $(LTCOMPILE) -c $(TOP)/src/table.c
 
490
 
 
491
tclsqlite.lo:   $(TOP)/src/tclsqlite.c $(HDR)
 
492
        $(LTCOMPILE) -c $(TOP)/src/tclsqlite.c
 
493
 
 
494
tokenize.lo:    $(TOP)/src/tokenize.c keywordhash.h $(HDR)
 
495
        $(LTCOMPILE) -c $(TOP)/src/tokenize.c
 
496
 
 
497
keywordhash.h:  $(TOP)/tool/mkkeywordhash.c
 
498
        $(BCC) -o mkkeywordhash$(BEXE) $(OPTS) $(TOP)/tool/mkkeywordhash.c
 
499
        ./mkkeywordhash$(BEXE) >keywordhash.h
 
500
 
 
501
trigger.lo:     $(TOP)/src/trigger.c $(HDR)
 
502
        $(LTCOMPILE) -c $(TOP)/src/trigger.c
 
503
 
 
504
update.lo:      $(TOP)/src/update.c $(HDR)
 
505
        $(LTCOMPILE) -c $(TOP)/src/update.c
 
506
 
 
507
utf.lo: $(TOP)/src/utf.c $(HDR)
 
508
        $(LTCOMPILE) -c $(TOP)/src/utf.c
 
509
 
 
510
util.lo:        $(TOP)/src/util.c $(HDR)
 
511
        $(LTCOMPILE) -c $(TOP)/src/util.c
 
512
 
 
513
vacuum.lo:      $(TOP)/src/vacuum.c $(HDR)
 
514
        $(LTCOMPILE) -c $(TOP)/src/vacuum.c
 
515
 
 
516
vdbe.lo:        $(TOP)/src/vdbe.c $(VDBEHDR)
 
517
        $(LTCOMPILE) -c $(TOP)/src/vdbe.c
 
518
 
 
519
vdbeapi.lo:     $(TOP)/src/vdbeapi.c $(VDBEHDR)
 
520
        $(LTCOMPILE) -c $(TOP)/src/vdbeapi.c
 
521
 
 
522
vdbeaux.lo:     $(TOP)/src/vdbeaux.c $(VDBEHDR)
 
523
        $(LTCOMPILE) -c $(TOP)/src/vdbeaux.c
 
524
 
 
525
vdbeblob.lo:    $(TOP)/src/vdbeblob.c $(VDBEHDR)
 
526
        $(LTCOMPILE) -c $(TOP)/src/vdbeblob.c
 
527
 
 
528
vdbefifo.lo:    $(TOP)/src/vdbefifo.c $(VDBEHDR)
 
529
        $(LTCOMPILE) -c $(TOP)/src/vdbefifo.c
 
530
 
 
531
vdbemem.lo:     $(TOP)/src/vdbemem.c $(VDBEHDR)
 
532
        $(LTCOMPILE) -c $(TOP)/src/vdbemem.c
 
533
 
 
534
vtab.lo:        $(TOP)/src/vtab.c $(VDBEHDR)
 
535
        $(LTCOMPILE) -c $(TOP)/src/vtab.c
 
536
 
 
537
where.lo:       $(TOP)/src/where.c $(HDR)
 
538
        $(LTCOMPILE) -c $(TOP)/src/where.c
 
539
 
 
540
tclsqlite-shell.lo:     $(TOP)/src/tclsqlite.c $(HDR)
 
541
        $(LTCOMPILE) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c
 
542
 
 
543
tclsqlite-stubs.lo:     $(TOP)/src/tclsqlite.c $(HDR)
 
544
        $(LTCOMPILE) -DTCL_USE_STUBS=1 -o $@ -c $(TOP)/src/tclsqlite.c
 
545
 
 
546
tclsqlite3:     tclsqlite-shell.lo libsqlite3.la
 
547
        $(LTLINK) -o tclsqlite3 tclsqlite-shell.lo \
 
548
                 libsqlite3.la $(LIBTCL)
 
549
 
 
550
testfixture$(TEXE):     $(TOP)/src/tclsqlite.c libsqlite3.la $(TESTSRC)
 
551
        $(LTLINK) -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \
 
552
                -DSQLITE_NO_SYNC=1 $(TEMP_STORE) \
 
553
                -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \
 
554
                libsqlite3.la $(LIBTCL)
 
555
 
 
556
 
 
557
fulltest:       testfixture$(TEXE) sqlite3$(TEXE)
 
558
        ./testfixture $(TOP)/test/all.test
 
559
 
 
560
test:   testfixture$(TEXE) sqlite3$(TEXE)
 
561
        ./testfixture $(TOP)/test/quick.test
 
562
 
 
563
sqlite3_analyzer$(TEXE):        $(TOP)/src/tclsqlite.c libtclsqlite3.la \
 
564
                                $(TESTSRC) $(TOP)/tool/spaceanal.tcl
 
565
        sed \
 
566
          -e '/^#/d' \
 
567
          -e 's,\\,\\\\,g' \
 
568
          -e 's,",\\",g' \
 
569
          -e 's,^,",' \
 
570
          -e 's,$$,\\n",' \
 
571
          $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
 
572
        $(LTLINK) -DTCLSH=2 -DSQLITE_TEST=1 $(TEMP_STORE)\
 
573
                -o sqlite3_analyzer$(EXE) $(TESTSRC) $(TOP)/src/tclsqlite.c \
 
574
                libtclsqlite3.la $(LIBTCL)
 
575
 
 
576
 
 
577
install:        sqlite3$(BEXE) libsqlite3.la sqlite3.h ${HAVE_TCL:1=tcl_install}
 
578
        $(INSTALL) -d $(DESTDIR)$(libdir)
 
579
        $(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir)
 
580
        $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
 
581
        $(LTINSTALL) sqlite3$(BEXE) $(DESTDIR)$(exec_prefix)/bin
 
582
        $(INSTALL) -d $(DESTDIR)$(prefix)/include
 
583
        $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(prefix)/include
 
584
        $(INSTALL) -m 0644 $(TOP)/src/sqlite3ext.h $(DESTDIR)$(prefix)/include
 
585
        $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig; 
 
586
        $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(libdir)/pkgconfig; 
 
587
 
 
588
tcl_install:    libtclsqlite3.la
 
589
        tclsh $(TOP)/tclinstaller.tcl $(VERSION)
 
590
 
 
591
clean:  
 
592
        rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la
 
593
        rm -f sqlite3.h opcodes.*
 
594
        rm -rf .libs .deps 
 
595
        rm -f lemon$(BEXE) lempar.c parse.* sqlite*.tar.gz
 
596
        rm -f mkkeywordhash$(BEXE) keywordhash.h
 
597
        rm -f $(PUBLISH)
 
598
        rm -f *.da *.bb *.bbg gmon.out
 
599
        rm -f testfixture$(TEXE) test.db
 
600
        rm -f common.tcl
 
601
        rm -f sqlite3.dll sqlite3.lib sqlite3.def
 
602
 
 
603
distclean:      clean
 
604
        rm -f config.log config.status libtool Makefile config.h sqlite3.pc
 
605
 
 
606
#
 
607
# Windows section
 
608
#
 
609
dll: sqlite3.dll
 
610
 
 
611
REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)
 
612
 
 
613
$(REAL_LIBOBJ): $(LIBOBJ)
 
614
 
 
615
sqlite3.def: $(REAL_LIBOBJ)
 
616
        echo 'EXPORTS' >sqlite3.def
 
617
        nm $(REAL_LIBOBJ) | grep ' T ' | grep ' _sqlite3_' \
 
618
                | sed 's/^.* _//' >>sqlite3.def
 
619
 
 
620
sqlite3.dll: $(REAL_LIBOBJ) sqlite3.def
 
621
        $(TCC) -shared -o sqlite3.dll sqlite3.def \
 
622
                -Wl,"--strip-all" $(REAL_LIBOBJ)