File: Makefile.in

package info (click to toggle)
sqlite 2.8.17-12
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,676 kB
  • ctags: 3,102
  • sloc: ansic: 32,407; tcl: 10,821; sh: 7,775; yacc: 677; makefile: 376; awk: 62
file content (508 lines) | stat: -rw-r--r-- 14,070 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
#!/usr/make
#
# Makefile for SQLITE
#
# This makefile is suppose to be configured automatically using the
# autoconf.  But if that does not work for you, you can configure
# the makefile manually.  Just set the parameters below to values that
# work well for your system.
#
# If the configure script does not work out-of-the-box, you might
# be able to get it to work by giving it some hints.  See the comment
# at the beginning of configure.in for additional information.
#

# The toplevel directory of the source tree.  This is the directory
# that contains this "Makefile.in" and the "configure.in" script.
#
TOP = @srcdir@

# C Compiler and options for use in building executables that
# will run on the platform that is doing the build.
#
BCC = @BUILD_CC@ @BUILD_CFLAGS@

# C Compile and options for use in building executables that 
# will run on the target platform.  (BCC and TCC are usually the
# same unless your are cross-compiling.)
#
TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src

# Some standard variables and programs
#
prefix = @prefix@
exec_prefix = @exec_prefix@
INSTALL = @INSTALL@
LIBTOOL = ./libtool
RELEASE = @ALLOWRELEASE@

# libtool compile/link/install
LTCOMPILE = $(LIBTOOL) --mode=compile $(TCC)
LTLINK = $(LIBTOOL) --mode=link $(TCC)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)

# Compiler options needed for programs that use the TCL library.
#
TCL_FLAGS = @TARGET_TCL_INC@

# The library that programs using TCL must link against.
#
LIBTCL = @TARGET_TCL_LIBS@

# Compiler options needed for programs that use the readline() library.
#
READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@

# The library that programs using readline() must link against.
#
LIBREADLINE = @TARGET_READLINE_LIBS@

# Should the database engine assume text is coded as UTF-8 or iso8859?
#
# ENCODING  = UTF8
# ENCODING  = ISO8859
ENCODING = @ENCODING@

# Flags controlling use of the in memory btree implementation
#
# SQLITE_OMIT_INMEMORYDB is defined in order to omit the in-memory
# red/black tree driver in the file btree_rb.c
#
# TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
# default to file, 2 to default to memory, and 3 to force temporary
# tables to always be in memory.
#
INMEMORYDB = @INMEMORYDB@
INCOREFLAGS = -DTEMP_STORE=@TEMP_STORE@

ifeq (${INMEMORYDB},0)
INCOREFLAGS += -DSQLITE_OMIT_INMEMORYDB=1
endif

# You should not have to change anything below this line
###############################################################################

# Object files for the SQLite library.
#
LIBOBJ = attach.lo auth.lo btree.lo build.lo copy.lo date.lo \
         delete.lo encode.lo expr.lo func.lo hash.lo insert.lo \
         main.lo opcodes.lo os.lo pager.lo parse.lo pragma.lo \
         printf.lo random.lo select.lo table.lo tokenize.lo \
         update.lo util.lo vacuum.lo vdbe.lo vdbeaux.lo \
         where.lo trigger.lo

# Only build the in-core DB if it is required.
ifeq (${INMEMORYDB},1)
LIBOBJ += btree_rb.lo
endif

# All of the source code files.
#
SRC = \
  $(TOP)/src/attach.c \
  $(TOP)/src/auth.c \
  $(TOP)/src/btree.c \
  $(TOP)/src/btree.h \
  $(TOP)/src/btree_rb.c \
  $(TOP)/src/build.c \
  $(TOP)/src/copy.c \
  $(TOP)/src/date.c \
  $(TOP)/src/delete.c \
  $(TOP)/src/encode.c \
  $(TOP)/src/expr.c \
  $(TOP)/src/func.c \
  $(TOP)/src/hash.c \
  $(TOP)/src/hash.h \
  $(TOP)/src/insert.c \
  $(TOP)/src/main.c \
  $(TOP)/src/os.c \
  $(TOP)/src/pager.c \
  $(TOP)/src/pager.h \
  $(TOP)/src/parse.y \
  $(TOP)/src/pragma.c \
  $(TOP)/src/printf.c \
  $(TOP)/src/random.c \
  $(TOP)/src/select.c \
  $(TOP)/src/shell.c \
  $(TOP)/src/sqlite.h.in \
  $(TOP)/src/sqliteInt.h \
  $(TOP)/src/table.c \
  $(TOP)/src/tclsqlite.c \
  $(TOP)/src/tokenize.c \
  $(TOP)/src/trigger.c \
  $(TOP)/src/update.c \
  $(TOP)/src/util.c \
  $(TOP)/src/vacuum.c \
  $(TOP)/src/vdbe.c \
  $(TOP)/src/vdbeaux.c \
  $(TOP)/src/vdbe.h \
  $(TOP)/src/where.c

# Source code to the test files.
#
TESTSRC = \
  $(TOP)/src/btree.c \
  $(TOP)/src/func.c \
  $(TOP)/src/os.c \
  $(TOP)/src/pager.c \
  $(TOP)/src/test1.c \
  $(TOP)/src/test2.c \
  $(TOP)/src/test3.c \
  $(TOP)/src/test4.c \
  $(TOP)/src/vdbe.c \
  $(TOP)/src/md5.c

# Header files used by all library source files.
#
HDR = \
   sqlite.h  \
   $(TOP)/src/btree.h \
   config.h \
   $(TOP)/src/hash.h \
   opcodes.h \
   $(TOP)/src/os.h \
   $(TOP)/src/sqliteInt.h  \
   $(TOP)/src/vdbe.h  \
   parse.h

# Header files used by the VDBE submodule
#
VDBEHDR = \
   $(HDR) \
   $(TOP)/src/vdbeInt.h

# This is the default Makefile target.  The objects listed here
# are what get build when you type just "make" with no arguments.
#
all:	sqlite.h libsqlite.la sqlite@TARGET_EXEEXT@

Makefile: $(TOP)/Makefile.in
	./config.status

# Generate the file "last_change" which contains the date of change
# of the most recently modified source code file
#
last_change:	$(SRC)
	cat $(SRC) | grep '$$Id: ' | sort -k 4 | tail -1 \
          | awk '{print $$5,$$6}' >last_change

libsqlite.la:	$(LIBOBJ)
	$(LTLINK) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath @exec_prefix@/lib \
		-version-info "8:6:8"

libtclsqlite.la:	tclsqlite.lo libsqlite.la
	$(LTLINK) -o libtclsqlite.la tclsqlite.lo \
		libsqlite.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite \
		-version-info "8:6:8"

sqlite@TARGET_EXEEXT@:	$(TOP)/src/shell.c libsqlite.la sqlite.h
	$(LTLINK) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \
		libsqlite.la $(LIBREADLINE)

# This target creates a directory named "tsrc" and fills it with
# copies of all of the C source code and header files needed to
# build on the target system.  Some of the C source code and header
# files are automatically generated.  This target takes care of
# all that automatic generation.
#
target_source:	$(SRC) $(VDBEHDR) 
	rm -rf tsrc
	mkdir tsrc
	cp $(SRC) $(VDBEHDR) tsrc
	rm tsrc/sqlite.h.in tsrc/parse.y
	cp parse.c opcodes.c tsrc

# Rules to build the LEMON compiler generator
#
lemon@BUILD_EXEEXT@:	$(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
	$(BCC) -o lemon $(TOP)/tool/lemon.c
	cp $(TOP)/tool/lempar.c .

btree.lo:	$(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
	$(LTCOMPILE) -c $(TOP)/src/btree.c

btree_rb.lo:	$(TOP)/src/btree_rb.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/btree_rb.c

build.lo:	$(TOP)/src/build.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/build.c

main.lo:	$(TOP)/src/main.c $(HDR)
	$(LTCOMPILE) -c ${INCOREFLAGS} $(TOP)/src/main.c

pager.lo:	$(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
	$(LTCOMPILE) -c $(TOP)/src/pager.c

opcodes.lo:	opcodes.c
	$(LTCOMPILE) -c opcodes.c

opcodes.c:	$(TOP)/src/vdbe.c
	echo '/* Automatically generated file.  Do not edit */' >opcodes.c
	echo 'char *sqliteOpcodeNames[] = { "???", ' >>opcodes.c
	grep '^case OP_' $(TOP)/src/vdbe.c | \
	  sed -e 's/^.*OP_/  "/' -e 's/:.*$$/", /' >>opcodes.c
	echo '};' >>opcodes.c

opcodes.h:	$(TOP)/src/vdbe.h
	echo '/* Automatically generated file.  Do not edit */' >opcodes.h
	grep '^case OP_' $(TOP)/src/vdbe.c | \
	  sed -e 's/://' | \
	  awk '{printf "#define %-30s %3d\n", $$2, ++cnt}' >>opcodes.h

os.lo:	$(TOP)/src/os.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/os.c

parse.lo:	parse.c $(HDR)
	$(LTCOMPILE) -c parse.c

parse.h:	parse.c

parse.c:	$(TOP)/src/parse.y lemon@BUILD_EXEEXT@
	cp $(TOP)/src/parse.y .
	./lemon parse.y

# The config.h file will contain a single #define that tells us how
# many bytes are in a pointer.  This only works if a pointer is the
# same size on the host as it is on the target.  If you are cross-compiling
# to a target with a different pointer size, you'll need to manually
# configure the config.h file.
#
config.h:	
	echo '#include <stdio.h>' >temp.c
	echo 'int main(){printf(' >>temp.c
	echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
	echo 'exit(0);}' >>temp.c
	$(BCC) -o temp temp.c
	./temp >config.h
	echo >>config.h
	rm -f temp.c temp

sqlite.h:	$(TOP)/src/sqlite.h.in 
	sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
            -e s/--ENCODING--/$(ENCODING)/ \
                 $(TOP)/src/sqlite.h.in >sqlite.h

tokenize.lo:	$(TOP)/src/tokenize.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/tokenize.c

util.lo:	$(TOP)/src/util.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/util.c

vdbe.lo:	$(TOP)/src/vdbe.c $(VDBEHDR)
	$(LTCOMPILE) -c $(TOP)/src/vdbe.c

vdbeaux.lo:	$(TOP)/src/vdbe.c $(VDBEHDR)
	$(LTCOMPILE) -c $(TOP)/src/vdbeaux.c

where.lo:	$(TOP)/src/where.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/where.c

copy.lo:	$(TOP)/src/copy.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/copy.c

date.lo:	$(TOP)/src/date.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/date.c

delete.lo:	$(TOP)/src/delete.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/delete.c

encode.lo:	$(TOP)/src/encode.c
	$(LTCOMPILE) -c $(TOP)/src/encode.c

expr.lo:	$(TOP)/src/expr.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/expr.c

func.lo:	$(TOP)/src/func.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/func.c

hash.lo:	$(TOP)/src/hash.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/hash.c

insert.lo:	$(TOP)/src/insert.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/insert.c

random.lo:	$(TOP)/src/random.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/random.c

select.lo:	$(TOP)/src/select.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/select.c

table.lo:	$(TOP)/src/table.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/table.c

trigger.lo:	$(TOP)/src/trigger.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/trigger.c

update.lo:	$(TOP)/src/update.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/update.c

vacuum.lo:	$(TOP)/src/vacuum.c $(HDR)
	$(LTCOMPILE) -c $(TOP)/src/vacuum.c

tclsqlite.lo:	$(TOP)/src/tclsqlite.c $(HDR)
	$(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c

pragma.lo:	$(TOP)/src/pragma.c $(HDR)
	$(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/pragma.c

printf.lo:	$(TOP)/src/printf.c $(HDR)
	$(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/printf.c

attach.lo:	$(TOP)/src/attach.c $(HDR)
	$(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/attach.c

auth.lo:	$(TOP)/src/auth.c $(HDR)
	$(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/auth.c

tclsqlite-sh.lo:	$(TOP)/src/tclsqlite.c $(HDR)
	$(LTCOMPILE) $(TCL_FLAGS) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c

tclsqlite:	tclsqlite-sh.lo libsqlite.la
	$(LTLINK) $(TCL_FLAGS) -o tclsqlite tclsqlite-sh.lo libsqlite.la $(LIBTCL)

testfixture@TARGET_EXEEXT@:	$(TOP)/src/tclsqlite.c libtclsqlite.la libsqlite.la $(TESTSRC)
	$(LTLINK) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1\
                -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \
		libtclsqlite.la libsqlite.la $(LIBTCL)

fulltest:	testfixture@TARGET_EXEEXT@ sqlite@TARGET_EXEEXT@
	./testfixture $(TOP)/test/all.test

test:	testfixture@TARGET_EXEEXT@ sqlite@TARGET_EXEEXT@
	./testfixture $(TOP)/test/quick.test

index.html:	$(TOP)/www/index.tcl last_change
	tclsh $(TOP)/www/index.tcl `cat $(TOP)/VERSION` >index.html

sqlite.html:	$(TOP)/www/sqlite.tcl
	tclsh $(TOP)/www/sqlite.tcl >sqlite.html

c_interface.html:	$(TOP)/www/c_interface.tcl
	tclsh $(TOP)/www/c_interface.tcl >c_interface.html

changes.html:	$(TOP)/www/changes.tcl
	tclsh $(TOP)/www/changes.tcl >changes.html

lang.html:	$(TOP)/www/lang.tcl
	tclsh $(TOP)/www/lang.tcl >lang.html

vdbe.html:	$(TOP)/www/vdbe.tcl
	tclsh $(TOP)/www/vdbe.tcl >vdbe.html

arch.html:	$(TOP)/www/arch.tcl
	tclsh $(TOP)/www/arch.tcl >arch.html

arch.png:	$(TOP)/www/arch.png
	cp $(TOP)/www/arch.png .

opcode.html:	$(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
	tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html

mingw.html:	$(TOP)/www/mingw.tcl
	tclsh $(TOP)/www/mingw.tcl >mingw.html

tclsqlite.html:	$(TOP)/www/tclsqlite.tcl
	tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html

speed.html:	$(TOP)/www/speed.tcl
	tclsh $(TOP)/www/speed.tcl >speed.html

faq.html:	$(TOP)/www/faq.tcl
	tclsh $(TOP)/www/faq.tcl >faq.html

formatchng.html:	$(TOP)/www/formatchng.tcl
	tclsh $(TOP)/www/formatchng.tcl >formatchng.html

conflict.html:	$(TOP)/www/conflict.tcl
	tclsh $(TOP)/www/conflict.tcl >conflict.html

download.html:	$(TOP)/www/download.tcl
	tclsh $(TOP)/www/download.tcl >download.html

omitted.html:	$(TOP)/www/omitted.tcl
	tclsh $(TOP)/www/omitted.tcl >omitted.html

datatypes.html:	$(TOP)/www/datatypes.tcl
	tclsh $(TOP)/www/datatypes.tcl >datatypes.html

quickstart.html:	$(TOP)/www/quickstart.tcl
	tclsh $(TOP)/www/quickstart.tcl >quickstart.html

fileformat.html:	$(TOP)/www/fileformat.tcl
	tclsh $(TOP)/www/fileformat.tcl >fileformat.html

nulls.html:	$(TOP)/www/nulls.tcl
	tclsh $(TOP)/www/nulls.tcl >nulls.html


# Files to be published on the website.
#
DOC = \
  index.html \
  sqlite.html \
  changes.html \
  lang.html \
  opcode.html \
  arch.html \
  arch.png \
  vdbe.html \
  c_interface.html \
  mingw.html \
  tclsqlite.html \
  download.html \
  speed.html \
  faq.html \
  formatchng.html \
  conflict.html \
  omitted.html \
  datatypes.html \
  quickstart.html \
  fileformat.html \
  nulls.html

doc:	$(DOC)
	mkdir -p doc
	mv $(DOC) doc

install:	sqlite libsqlite.la sqlite.h
	$(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib
	$(LTINSTALL) libsqlite.la $(DESTDIR)$(exec_prefix)/lib
	$(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
	$(LTINSTALL) sqlite $(DESTDIR)$(exec_prefix)/bin
	$(INSTALL) -d $(DESTDIR)$(prefix)/include
	$(INSTALL) -m 0644 sqlite.h $(DESTDIR)$(prefix)/include
	$(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig; 
	$(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig; 

clean:	
	rm -f *.lo *.la *.o sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.*
	rm -rf .libs .deps 
	rm -f lemon@BUILD_EXEEXT@ lempar.c parse.* sqlite*.tar.gz
	rm -f $(PUBLISH)
	rm -f *.da *.bb *.bbg gmon.out
	rm -f testfixture@TARGET_EXEEXT@ test.db
	rm -rf doc
	rm -f sqlite.dll sqlite.lib

#
# Windows section; all this funky .dll stuff ;-)
#
dll: sqlite.dll

REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)

sqlite.dll: $(LIBOBJ) $(TOP)/sqlite.def
	dllwrap --dllname sqlite.dll --def $(TOP)/sqlite.def $(REAL_LIBOBJ)
	strip sqlite.dll

#target for dll import libraries
implib: sqlite.lib 

#make Borland C++ and/or Microsoft VC import library for the dll
#   ignore any errors (usually due to missing programs)
sqlite.lib: sqlite.dll
	-implib -a sqlite.lib sqlite.dll
	-lib /machine:i386 /def:$(TOP)/sqlite.def 

distclean:	clean
	rm -f config.log config.status libtool Makefile config.h