blob: 28850bdee9ea81a401c19c5afb48a4f9c71a96f0 [file] [log] [blame]
drh376deb12004-06-30 11:41:55 +00001#!/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#
18TOP = @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#
23BCC = @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#
drhb733c182004-06-30 23:17:05 +000029TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src -DNDEBUG
drh376deb12004-06-30 11:41:55 +000030
31# Some standard variables and programs
32#
33prefix = @prefix@
34exec_prefix = @exec_prefix@
35INSTALL = @INSTALL@
36LIBTOOL = ./libtool
37RELEASE = @ALLOWRELEASE@
38
39# libtool compile/link/install
40LTCOMPILE = $(LIBTOOL) --mode=compile $(TCC)
41LTLINK = $(LIBTOOL) --mode=link $(TCC)
42LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
43
44# Compiler options needed for programs that use the TCL library.
45#
46TCL_FLAGS = @TARGET_TCL_INC@
47
48# The library that programs using TCL must link against.
49#
50LIBTCL = @TARGET_TCL_LIBS@
51
52# Compiler options needed for programs that use the readline() library.
53#
54READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@
55
56# The library that programs using readline() must link against.
57#
58LIBREADLINE = @TARGET_READLINE_LIBS@
59
60# Should the database engine be compiled threadsafe
61#
62THREADSAFE = -DTHREADSAFE=@THREADSAFE@
63
64# Flags controlling use of the in memory btree implementation
65#
66# TEMP_STORE is 0 to force temporary tables to be in a file, 1 to
67# default to file, 2 to default to memory, and 3 to force temporary
68# tables to always be in memory.
69#
70TEMP_STORE = -DTEMP_STORE=@TEMP_STORE@
71
72# You should not have to change anything below this line
73###############################################################################
74
75# Object files for the SQLite library.
76#
77LIBOBJ = attach.lo auth.lo btree.lo build.lo date.lo delete.lo \
78 expr.lo func.lo hash.lo insert.lo \
79 main.lo opcodes.lo os_mac.lo os_unix.lo os_win.lo \
80 pager.lo parse.lo pragma.lo printf.lo random.lo \
81 select.lo table.lo tokenize.lo trigger.lo update.lo util.lo vacuum.lo \
82 vdbe.lo vdbeapi.lo vdbeaux.lo vdbemem.lo \
83 where.lo utf.lo legacy.lo
84
85# All of the source code files.
86#
87SRC = \
88 $(TOP)/src/attach.c \
89 $(TOP)/src/auth.c \
90 $(TOP)/src/btree.c \
91 $(TOP)/src/btree.h \
92 $(TOP)/src/build.c \
93 $(TOP)/src/date.c \
94 $(TOP)/src/delete.c \
95 $(TOP)/src/encode.c \
96 $(TOP)/src/expr.c \
97 $(TOP)/src/func.c \
98 $(TOP)/src/hash.c \
99 $(TOP)/src/hash.h \
100 $(TOP)/src/insert.c \
101 $(TOP)/src/legacy.c \
102 $(TOP)/src/main.c \
103 $(TOP)/src/os_mac.c \
104 $(TOP)/src/os_unix.c \
105 $(TOP)/src/os_win.c \
106 $(TOP)/src/pager.c \
107 $(TOP)/src/pager.h \
108 $(TOP)/src/parse.y \
109 $(TOP)/src/pragma.c \
110 $(TOP)/src/printf.c \
111 $(TOP)/src/random.c \
112 $(TOP)/src/select.c \
113 $(TOP)/src/shell.c \
114 $(TOP)/src/sqlite.h.in \
115 $(TOP)/src/sqliteInt.h \
116 $(TOP)/src/table.c \
117 $(TOP)/src/tclsqlite.c \
118 $(TOP)/src/tokenize.c \
119 $(TOP)/src/trigger.c \
120 $(TOP)/src/utf.c \
121 $(TOP)/src/update.c \
122 $(TOP)/src/util.c \
123 $(TOP)/src/vacuum.c \
124 $(TOP)/src/vdbe.c \
125 $(TOP)/src/vdbe.h \
126 $(TOP)/src/vdbeapi.c \
127 $(TOP)/src/vdbeaux.c \
128 $(TOP)/src/vdbemem.c \
129 $(TOP)/src/vdbeInt.h \
130 $(TOP)/src/where.c
131
132# Source code to the test files.
133#
134TESTSRC = \
135 $(TOP)/src/btree.c \
136 $(TOP)/src/func.c \
137 $(TOP)/src/os_mac.c \
138 $(TOP)/src/os_unix.c \
139 $(TOP)/src/os_win.c \
140 $(TOP)/src/pager.c \
141 $(TOP)/src/pragma.c \
142 $(TOP)/src/printf.c \
143 $(TOP)/src/test1.c \
144 $(TOP)/src/test2.c \
145 $(TOP)/src/test3.c \
146 $(TOP)/src/test4.c \
147 $(TOP)/src/test5.c \
148 $(TOP)/src/utf.c \
149 $(TOP)/src/vdbe.c \
150 $(TOP)/src/md5.c
151
152# Header files used by all library source files.
153#
154HDR = \
155 sqlite3.h \
156 $(TOP)/src/btree.h \
157 config.h \
158 $(TOP)/src/hash.h \
159 opcodes.h \
160 $(TOP)/src/os.h \
161 $(TOP)/src/os_common.h \
162 $(TOP)/src/os_mac.h \
163 $(TOP)/src/os_unix.h \
164 $(TOP)/src/os_win.h \
165 $(TOP)/src/sqliteInt.h \
166 $(TOP)/src/vdbe.h \
167 parse.h
168
169# Header files used by the VDBE submodule
170#
171VDBEHDR = \
172 $(HDR) \
173 $(TOP)/src/vdbeInt.h
174
175# This is the default Makefile target. The objects listed here
176# are what get build when you type just "make" with no arguments.
177#
178all: sqlite3.h libsqlite3.la sqlite3@TARGET_EXEEXT@
179
180Makefile: $(TOP)/Makefile.in
181 ./config.status
182
183# Generate the file "last_change" which contains the date of change
184# of the most recently modified source code file
185#
186last_change: $(SRC)
187 cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
188 | awk '{print $$5,$$6}' >last_change
189
190libsqlite3.la: $(LIBOBJ)
191 $(LTLINK) -o libsqlite3.la $(LIBOBJ) ${RELEASE} -rpath @exec_prefix@/lib \
192 -version-info "8:6:8"
193
194libtclsqlite3.la: tclsqlite.lo libsqlite3.la
195 $(LTLINK) -o libtclsqlite3.la tclsqlite.lo \
196 libsqlite3.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite \
197 -version-info "8:6:8"
198
199sqlite3@TARGET_EXEEXT@: $(TOP)/src/shell.c libsqlite3.la sqlite3.h
200 $(LTLINK) $(READLINE_FLAGS) -o sqlite3 $(TOP)/src/shell.c \
201 libsqlite3.la $(LIBREADLINE)
202
203# This target creates a directory named "tsrc" and fills it with
204# copies of all of the C source code and header files needed to
205# build on the target system. Some of the C source code and header
206# files are automatically generated. This target takes care of
207# all that automatic generation.
208#
209target_source: $(SRC) $(VDBEHDR)
210 rm -rf tsrc
211 mkdir tsrc
212 cp $(SRC) $(VDBEHDR) tsrc
213 rm tsrc/sqlite.h.in tsrc/parse.y
214 cp parse.c opcodes.c tsrc
drh4aec8b62004-08-28 16:19:00 +0000215 cp $(TOP)/sqlite3.def tsrc
drh376deb12004-06-30 11:41:55 +0000216
217# Rules to build the LEMON compiler generator
218#
219lemon@BUILD_EXEEXT@: $(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
220 $(BCC) -o lemon $(TOP)/tool/lemon.c
221 cp $(TOP)/tool/lempar.c .
222
223
224# Rules to build individual files
225#
226attach.lo: $(TOP)/src/attach.c $(HDR)
227 $(LTCOMPILE) -c $(TOP)/src/attach.c
228
229auth.lo: $(TOP)/src/auth.c $(HDR)
230 $(LTCOMPILE) -c $(TOP)/src/auth.c
231
232btree.lo: $(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
233 $(LTCOMPILE) -c $(TOP)/src/btree.c
234
235build.lo: $(TOP)/src/build.c $(HDR)
236 $(LTCOMPILE) -c $(TOP)/src/build.c
237
238# The config.h file will contain a single #define that tells us how
239# many bytes are in a pointer. This only works if a pointer is the
240# same size on the host as it is on the target. If you are cross-compiling
241# to a target with a different pointer size, you'll need to manually
242# configure the config.h file.
243#
244config.h:
245 echo '#include <stdio.h>' >temp.c
246 echo 'int main(){printf(' >>temp.c
247 echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
248 echo 'exit(0);}' >>temp.c
249 $(BCC) -o temp temp.c
250 ./temp >config.h
251 echo >>config.h
252 rm -f temp.c temp
253
254date.lo: $(TOP)/src/date.c $(HDR)
255 $(LTCOMPILE) -c $(TOP)/src/date.c
256
257delete.lo: $(TOP)/src/delete.c $(HDR)
258 $(LTCOMPILE) -c $(TOP)/src/delete.c
259
260encode.lo: $(TOP)/src/encode.c
261 $(LTCOMPILE) -c $(TOP)/src/encode.c
262
263expr.lo: $(TOP)/src/expr.c $(HDR)
264 $(LTCOMPILE) -c $(TOP)/src/expr.c
265
266func.lo: $(TOP)/src/func.c $(HDR)
267 $(LTCOMPILE) -c $(TOP)/src/func.c
268
269hash.lo: $(TOP)/src/hash.c $(HDR)
270 $(LTCOMPILE) -c $(TOP)/src/hash.c
271
272insert.lo: $(TOP)/src/insert.c $(HDR)
273 $(LTCOMPILE) -c $(TOP)/src/insert.c
274
275legacy.lo: $(TOP)/src/legacy.c $(HDR)
276 $(LTCOMPILE) -c $(TOP)/src/legacy.c
277
278main.lo: $(TOP)/src/main.c $(HDR)
279 $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/main.c
280
281pager.lo: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
282 $(LTCOMPILE) -c $(TOP)/src/pager.c
283
284opcodes.lo: opcodes.c
285 $(LTCOMPILE) -c opcodes.c
286
287opcodes.c: $(TOP)/src/vdbe.c
288 echo '/* Automatically generated file. Do not edit */' >opcodes.c
289 echo 'char *sqlite3OpcodeNames[] = { "???", ' >>opcodes.c
290 grep '^case OP_' $(TOP)/src/vdbe.c | \
291 sed -e 's/^.*OP_/ "/' -e 's/:.*$$/", /' >>opcodes.c
292 echo '};' >>opcodes.c
293
294opcodes.h: $(TOP)/src/vdbe.h
295 echo '/* Automatically generated file. Do not edit */' >opcodes.h
296 grep '^case OP_' $(TOP)/src/vdbe.c | \
297 sed -e 's/://' | \
298 awk '{printf "#define %-30s %3d\n", $$2, ++cnt}' >>opcodes.h
299
300os_mac.lo: $(TOP)/src/os_mac.c $(HDR)
301 $(LTCOMPILE) $(THREADSAFE) -c $(TOP)/src/os_mac.c
302
303os_unix.lo: $(TOP)/src/os_unix.c $(HDR)
304 $(LTCOMPILE) $(THREADSAFE) -c $(TOP)/src/os_unix.c
305
306os_win.lo: $(TOP)/src/os_win.c $(HDR)
307 $(LTCOMPILE) $(THREADSAFE) -c $(TOP)/src/os_win.c
308
309parse.lo: parse.c $(HDR)
310 $(LTCOMPILE) -c parse.c
311
312parse.h: parse.c
313
314parse.c: $(TOP)/src/parse.y lemon@BUILD_EXEEXT@
315 cp $(TOP)/src/parse.y .
316 ./lemon parse.y
317
318pragma.lo: $(TOP)/src/pragma.c $(HDR)
319 $(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/pragma.c
320
321printf.lo: $(TOP)/src/printf.c $(HDR)
322 $(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/printf.c
323
324random.lo: $(TOP)/src/random.c $(HDR)
325 $(LTCOMPILE) -c $(TOP)/src/random.c
326
327select.lo: $(TOP)/src/select.c $(HDR)
328 $(LTCOMPILE) -c $(TOP)/src/select.c
329
330sqlite3.h: $(TOP)/src/sqlite.h.in
331 sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
332 $(TOP)/src/sqlite.h.in >sqlite3.h
333
334table.lo: $(TOP)/src/table.c $(HDR)
335 $(LTCOMPILE) -c $(TOP)/src/table.c
336
337tclsqlite.lo: $(TOP)/src/tclsqlite.c $(HDR)
338 $(LTCOMPILE) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
339
340tokenize.lo: $(TOP)/src/tokenize.c $(HDR)
341 $(LTCOMPILE) -c $(TOP)/src/tokenize.c
342
343trigger.lo: $(TOP)/src/trigger.c $(HDR)
344 $(LTCOMPILE) -c $(TOP)/src/trigger.c
345
346update.lo: $(TOP)/src/update.c $(HDR)
347 $(LTCOMPILE) -c $(TOP)/src/update.c
348
349utf.lo: $(TOP)/src/utf.c $(HDR)
350 $(LTCOMPILE) -c $(TOP)/src/utf.c
351
352util.lo: $(TOP)/src/util.c $(HDR)
353 $(LTCOMPILE) -c $(TOP)/src/util.c
354
355vacuum.lo: $(TOP)/src/vacuum.c $(HDR)
356 $(LTCOMPILE) -c $(TOP)/src/vacuum.c
357
358vdbe.lo: $(TOP)/src/vdbe.c $(VDBEHDR)
359 $(LTCOMPILE) -c $(TOP)/src/vdbe.c
360
361vdbeapi.lo: $(TOP)/src/vdbeapi.c $(VDBEHDR)
362 $(LTCOMPILE) -c $(TOP)/src/vdbeapi.c
363
364vdbeaux.lo: $(TOP)/src/vdbeaux.c $(VDBEHDR)
365 $(LTCOMPILE) -c $(TOP)/src/vdbeaux.c
366
367vdbemem.lo: $(TOP)/src/vdbemem.c $(VDBEHDR)
368 $(LTCOMPILE) -c $(TOP)/src/vdbemem.c
369
370where.lo: $(TOP)/src/where.c $(HDR)
371 $(LTCOMPILE) -c $(TOP)/src/where.c
372
373tclsqlite-sh.lo: $(TOP)/src/tclsqlite.c $(HDR)
374 $(LTCOMPILE) $(TCL_FLAGS) -DTCLSH=1 -o $@ -c $(TOP)/src/tclsqlite.c
375
376tclsqlite3: tclsqlite-sh.lo libsqlite3.la
377 $(LTLINK) $(TCL_FLAGS) -o tclsqlite3 tclsqlite-sh.lo \
378 libsqlite3.la $(LIBTCL)
379
380testfixture@TARGET_EXEEXT@: $(TOP)/src/tclsqlite.c libtclsqlite3.la libsqlite3.la $(TESTSRC)
381 $(LTLINK) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1\
382 $(THREADSAFE) $(TEMP_STORE)\
383 -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \
384 libtclsqlite3.la libsqlite3.la $(LIBTCL)
385
386crashtest@TARGET_EXEEXT@: $(TOP)/src/tclsqlite.c libsqlite3.la $(TESTSRC) $(TOP)/src/os_test.c
387 $(LTLINK) $(TCL_FLAGS) -DOS_TEST=1 -DTCLSH=1 -DSQLITE_TEST=1 \
388 -o crashtest \
389 $(TESTSRC) $(TOP)/src/os_test.c $(TOP)/src/tclsqlite.c \
390 libsqlite3.la $(LIBTCL) $(THREADLIB)
391
392
393
394fulltest: testfixture@TARGET_EXEEXT@ sqlite3@TARGET_EXEEXT@ crashtest@TARGET_EXEEXT@
395 ./testfixture $(TOP)/test/all.test
396
397test: testfixture@TARGET_EXEEXT@ sqlite3@TARGET_EXEEXT@
398 ./testfixture $(TOP)/test/quick.test
399
400
401# Rules used to build documentation
402#
403arch.html: $(TOP)/www/arch.tcl
404 tclsh $(TOP)/www/arch.tcl >arch.html
405
406arch2.gif: $(TOP)/www/arch2.gif
407 cp $(TOP)/www/arch2.gif .
408
409c_interface.html: $(TOP)/www/c_interface.tcl
410 tclsh $(TOP)/www/c_interface.tcl >c_interface.html
411
412capi3.html: $(TOP)/www/capi3.tcl
413 tclsh $(TOP)/www/capi3.tcl >capi3.html
414
415capi3ref.html: $(TOP)/www/capi3ref.tcl
416 tclsh $(TOP)/www/capi3ref.tcl >capi3ref.html
417
418changes.html: $(TOP)/www/changes.tcl
419 tclsh $(TOP)/www/changes.tcl >changes.html
420
421copyright.html: $(TOP)/www/copyright.tcl
422 tclsh $(TOP)/www/copyright.tcl >copyright.html
423
424copyright-release.html: $(TOP)/www/copyright-release.html
425 cp $(TOP)/www/copyright-release.html .
426
427copyright-release.pdf: $(TOP)/www/copyright-release.pdf
428 cp $(TOP)/www/copyright-release.pdf .
429
430common.tcl: $(TOP)/www/common.tcl
431 cp $(TOP)/www/common.tcl .
432
433conflict.html: $(TOP)/www/conflict.tcl
434 tclsh $(TOP)/www/conflict.tcl >conflict.html
435
436datatypes.html: $(TOP)/www/datatypes.tcl
437 tclsh $(TOP)/www/datatypes.tcl >datatypes.html
438
439datatype3.html: $(TOP)/www/datatype3.tcl
440 tclsh $(TOP)/www/datatype3.tcl >datatype3.html
441
442docs.html: $(TOP)/www/docs.tcl
443 tclsh $(TOP)/www/docs.tcl >docs.html
444
445download.html: $(TOP)/www/download.tcl
446 mkdir doc
447 tclsh $(TOP)/www/download.tcl >download.html
448
449faq.html: $(TOP)/www/faq.tcl
450 tclsh $(TOP)/www/faq.tcl >faq.html
451
452fileformat.html: $(TOP)/www/fileformat.tcl
453 tclsh $(TOP)/www/fileformat.tcl >fileformat.html
454
455formatchng.html: $(TOP)/www/formatchng.tcl
456 tclsh $(TOP)/www/formatchng.tcl >formatchng.html
457
458index.html: $(TOP)/www/index.tcl last_change
459 tclsh $(TOP)/www/index.tcl >index.html
460
461lang.html: $(TOP)/www/lang.tcl
462 tclsh $(TOP)/www/lang.tcl >lang.html
463
464lockingv3.html: $(TOP)/www/lockingv3.tcl
465 tclsh $(TOP)/www/lockingv3.tcl >lockingv3.html
466
467oldnews.html: $(TOP)/www/oldnews.tcl
468 tclsh $(TOP)/www/oldnews.tcl >oldnews.html
469
470omitted.html: $(TOP)/www/omitted.tcl
471 tclsh $(TOP)/www/omitted.tcl >omitted.html
472
473opcode.html: $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c
474 tclsh $(TOP)/www/opcode.tcl $(TOP)/src/vdbe.c >opcode.html
475
476mingw.html: $(TOP)/www/mingw.tcl
477 tclsh $(TOP)/www/mingw.tcl >mingw.html
478
479nulls.html: $(TOP)/www/nulls.tcl
480 tclsh $(TOP)/www/nulls.tcl >nulls.html
481
482quickstart.html: $(TOP)/www/quickstart.tcl
483 tclsh $(TOP)/www/quickstart.tcl >quickstart.html
484
485speed.html: $(TOP)/www/speed.tcl
486 tclsh $(TOP)/www/speed.tcl >speed.html
487
488sqlite.gif: $(TOP)/art/SQLite.gif
489 cp $(TOP)/art/SQLite.gif sqlite.gif
490
491sqlite.html: $(TOP)/www/sqlite.tcl
492 tclsh $(TOP)/www/sqlite.tcl >sqlite.html
493
494support.html: $(TOP)/www/support.tcl
495 tclsh $(TOP)/www/support.tcl >support.html
496
497tclsqlite.html: $(TOP)/www/tclsqlite.tcl
498 tclsh $(TOP)/www/tclsqlite.tcl >tclsqlite.html
499
500vdbe.html: $(TOP)/www/vdbe.tcl
501 tclsh $(TOP)/www/vdbe.tcl >vdbe.html
502
503version3.html: $(TOP)/www/version3.tcl
504 tclsh $(TOP)/www/version3.tcl >version3.html
505
506
507# Files to be published on the website.
508#
509DOC = \
510 arch.html \
511 arch2.gif \
512 c_interface.html \
513 capi3.html \
514 capi3ref.html \
515 changes.html \
516 copyright.html \
517 copyright-release.html \
518 copyright-release.pdf \
519 conflict.html \
520 datatypes.html \
521 datatype3.html \
522 docs.html \
523 download.html \
524 faq.html \
525 fileformat.html \
526 formatchng.html \
527 index.html \
528 lang.html \
529 lockingv3.html \
530 mingw.html \
531 nulls.html \
532 oldnews.html \
533 omitted.html \
534 opcode.html \
535 quickstart.html \
536 speed.html \
537 sqlite.gif \
538 sqlite.html \
539 support.html \
540 tclsqlite.html \
541 vdbe.html \
542 version3.html
543
544doc: common.tcl $(DOC)
545 mkdir -p doc
546 mv $(DOC) doc
547
548install: sqlite3 libsqlite3.la sqlite3.h
549 $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib
550 $(LTINSTALL) libsqlite3.la $(DESTDIR)$(exec_prefix)/lib
551 $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
552 $(LTINSTALL) sqlite3 $(DESTDIR)$(exec_prefix)/bin
553 $(INSTALL) -d $(DESTDIR)$(prefix)/include
554 $(INSTALL) -m 0644 sqlite3.h $(DESTDIR)$(prefix)/include
555 $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
dougcurrie88215bd2004-07-19 22:28:43 +0000556 $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
drh376deb12004-06-30 11:41:55 +0000557
558clean:
559 rm -f *.lo *.la *.o sqlite3@TARGET_EXEEXT@ libsqlite3.la
560 rm -f sqlite3.h opcodes.*
561 rm -rf .libs .deps
562 rm -f lemon@BUILD_EXEEXT@ lempar.c parse.* sqlite*.tar.gz
563 rm -f $(PUBLISH)
564 rm -f *.da *.bb *.bbg gmon.out
565 rm -f testfixture@TARGET_EXEEXT@ test.db
566 rm -rf doc
567 rm -f common.tcl
568 rm -f sqlite3.dll sqlite3.lib
569
570#
571# Windows section; all this funky .dll stuff ;-)
572#
573dll: sqlite3.dll
574
575REAL_LIBOBJ = $(LIBOBJ:%.lo=.libs/%.o)
576
577sqlite3.dll: $(LIBOBJ) $(TOP)/sqlite3.def
578 dllwrap --dllname sqlite3.dll --def $(TOP)/sqlite3.def $(REAL_LIBOBJ)
579 strip sqlite3.dll
580
581#target for dll import libraries
582implib: sqlite3.lib
583
584#make Borland C++ and/or Microsoft VC import library for the dll
585# ignore any errors (usually due to missing programs)
586sqlite3.lib: sqlite3.dll
587 -implib -a sqlite3.lib sqlite3.dll
588 -lib /machine:i386 /def:$(TOP)/sqlite3.def
589
590distclean: clean
591 rm -f config.log config.status libtool Makefile config.h