Support using nmake via cmd.exe, allow Tcl related variables to be overridden via the environment, and add 'dll' to the 'all' target.
FossilOrigin-Name: 0cb0f30603b1658ae24d1b74d6ab59d05ef4e448
This commit is contained in:
parent
28e4e35586
commit
5b0b6fded7
44
Makefile.msc
44
Makefile.msc
@ -43,16 +43,32 @@ TCC = $(TCC) -I$(TOP)\ext\rtree
|
||||
#
|
||||
TCC = $(TCC) -DNDEBUG
|
||||
|
||||
# The library that programs using TCL must link against.
|
||||
# The locations of the Tcl header and library files. Also, the library that
|
||||
# non-stubs enabled programs using Tcl must link against. These variables
|
||||
# (TCLINCDIR, TCLLIBDIR, and LIBTCL) may be overridden via the environment
|
||||
# prior to running nmake in order to match the actual installed location and
|
||||
# version on this machine.
|
||||
#
|
||||
LIBTCL = tcl85.lib
|
||||
!if "$(TCLINCDIR)" == ""
|
||||
TCLINCDIR = c:\tcl\include
|
||||
!endif
|
||||
|
||||
!if "$(TCLLIBDIR)" == ""
|
||||
TCLLIBDIR = c:\tcl\lib
|
||||
!endif
|
||||
|
||||
!if "$(LIBTCL)" == ""
|
||||
LIBTCL = tcl85.lib
|
||||
!endif
|
||||
|
||||
# This is the command to use for tclsh - normally just "tclsh", but we may
|
||||
# know the specific version we want to use
|
||||
# know the specific version we want to use. This variable (TCLSH_CMD) may be
|
||||
# overridden via the environment prior to running nmake in order to select a
|
||||
# specific Tcl shell to use.
|
||||
#
|
||||
!if "$(TCLSH_CMD)" == ""
|
||||
TCLSH_CMD = tclsh85
|
||||
!endif
|
||||
|
||||
# Compiler options needed for programs that use the readline() library.
|
||||
#
|
||||
@ -118,7 +134,7 @@ LTLIBOPTS = /MACHINE:$(PLATFORM)
|
||||
!ENDIF
|
||||
|
||||
# nawk compatible awk.
|
||||
NAWK = .\gawk.exe
|
||||
NAWK = gawk.exe
|
||||
|
||||
# You should not have to change anything below this line
|
||||
###############################################################################
|
||||
@ -439,7 +455,7 @@ EXTHDR = $(EXTHDR) \
|
||||
# This is the default Makefile target. The objects listed here
|
||||
# are what get build when you type just "make" with no arguments.
|
||||
#
|
||||
all: libsqlite3.lib sqlite3.exe libtclsqlite3.lib
|
||||
all: dll libsqlite3.lib sqlite3.exe libtclsqlite3.lib
|
||||
|
||||
libsqlite3.lib: $(LIBOBJ)
|
||||
$(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
|
||||
@ -463,7 +479,7 @@ sqlite3.exe: $(TOP)\src\shell.c libsqlite3.lib sqlite3.h
|
||||
-mkdir tsrc
|
||||
for %i in ($(SRC)) do copy /Y %i tsrc
|
||||
del /Q tsrc\sqlite.h.in tsrc\parse.y
|
||||
$(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl <tsrc\vdbe.c >vdbe.new
|
||||
$(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl < tsrc\vdbe.c > vdbe.new
|
||||
move vdbe.new tsrc\vdbe.c
|
||||
echo > .target_source
|
||||
|
||||
@ -720,10 +736,10 @@ tclsqlite3.exe: tclsqlite-shell.lo libsqlite3.lib
|
||||
# Rules to build opcodes.c and opcodes.h
|
||||
#
|
||||
opcodes.c: opcodes.h $(TOP)\mkopcodec.awk
|
||||
$(NAWK) "/#define OP_/ { print }" opcodes.h | sort /+45 | $(NAWK) -f $(TOP)\mkopcodec.awk >opcodes.c
|
||||
$(NAWK) "/#define OP_/ { print }" opcodes.h | sort /+45 | $(NAWK) -f $(TOP)\mkopcodec.awk > opcodes.c
|
||||
|
||||
opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\mkopcodeh.awk
|
||||
type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk >opcodes.h
|
||||
type parse.h $(TOP)\src\vdbe.c | $(NAWK) -f $(TOP)\mkopcodeh.awk > opcodes.h
|
||||
|
||||
# Rules to build parse.c and parse.h - the outputs of lemon.
|
||||
#
|
||||
@ -734,16 +750,16 @@ parse.c: $(TOP)\src\parse.y lemon.exe $(TOP)\addopcodes.awk
|
||||
copy $(TOP)\src\parse.y .
|
||||
.\lemon.exe $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
|
||||
move parse.h parse.h.temp
|
||||
$(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp >parse.h
|
||||
$(NAWK) -f $(TOP)\addopcodes.awk parse.h.temp > parse.h
|
||||
|
||||
sqlite3.h: $(TOP)\src\sqlite.h.in $(TOP)\manifest.uuid $(TOP)\VERSION
|
||||
$(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP) >sqlite3.h
|
||||
$(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP) > sqlite3.h
|
||||
|
||||
mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
|
||||
$(BCC) -Femkkeywordhash.exe $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)\tool\mkkeywordhash.c
|
||||
|
||||
keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
|
||||
.\mkkeywordhash.exe >keywordhash.h
|
||||
.\mkkeywordhash.exe > keywordhash.h
|
||||
|
||||
|
||||
|
||||
@ -839,7 +855,7 @@ test: testfixture.exe sqlite3.exe
|
||||
|
||||
spaceanal_tcl.h: $(TOP)\tool\spaceanal.tcl
|
||||
$(NAWK) -f $(TOP)/tool/tostr.awk \
|
||||
$(TOP)\tool\spaceanal.tcl >spaceanal_tcl.h
|
||||
$(TOP)\tool\spaceanal.tcl > spaceanal_tcl.h
|
||||
|
||||
sqlite3_analyzer.exe: $(TESTFIXTURE_SRC) spaceanal_tcl.h
|
||||
$(LTLINK) -DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 \
|
||||
@ -866,10 +882,10 @@ clean:
|
||||
dll: sqlite3.dll
|
||||
|
||||
sqlite3.def: libsqlite3.lib
|
||||
echo EXPORTS >sqlite3.def
|
||||
echo EXPORTS > sqlite3.def
|
||||
dumpbin /all libsqlite3.lib \
|
||||
| $(NAWK) "/ 1 _sqlite3_/ { sub(/^.* _/,\"\");print }" \
|
||||
| sort >>sqlite3.def
|
||||
| sort >> sqlite3.def
|
||||
|
||||
sqlite3.dll: $(LIBOBJ) sqlite3.def
|
||||
link $(LTLINKOPTS) /DLL /DEF:sqlite3.def /OUT:$@ $(LIBOBJ)
|
||||
|
14
manifest
14
manifest
@ -1,9 +1,9 @@
|
||||
C Explicitly\scast\san\sargument\sto\sprintf()\sto\s(int),\sin\scase\sthe\sresult\sof\sthe\spointer\sarithmetic\sexpression\sis\sa\s64-bit\sinteger\son\ssome\splatforms.
|
||||
D 2011-06-24T18:43:23.777
|
||||
C Support\susing\snmake\svia\scmd.exe,\sallow\sTcl\srelated\svariables\sto\sbe\soverridden\svia\sthe\senvironment,\sand\sadd\s'dll'\sto\sthe\s'all'\starget.
|
||||
D 2011-06-25T01:14:36.767
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
F Makefile.msc 11082f65b452b908d93013292c17850378c39284
|
||||
F Makefile.msc 9c76731c20561a33ce1257c70be3f029cedb62a6
|
||||
F Makefile.vxworks c85ec1d8597fe2f7bc225af12ac1666e21379151
|
||||
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
|
||||
F VERSION 3fcdd7fbe3eb282df3978fe77288544543767961
|
||||
@ -949,7 +949,7 @@ F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00
|
||||
F tool/tostr.awk 11760e1b94a5d3dcd42378f3cc18544c06cfa576
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings.sh 2ebae31e1eb352696f3c2f7706a34c084b28c262
|
||||
P afbe9023a706375be53bce389ef4e806f17fc7ec
|
||||
R 39e40cd4e043bc5ee4d5e0c0bd1144c1
|
||||
U dan
|
||||
Z 0fb26f42eab966013b31af43c43a2eeb
|
||||
P 90cfeaf7b68eebc2cd75bc60b1bb86823646fe30
|
||||
R 9d6679872042f0704eb46a854652b6b2
|
||||
U mistachkin
|
||||
Z 10a97d70fb2ecf74c56670a3fe99eddd
|
||||
|
@ -1 +1 @@
|
||||
90cfeaf7b68eebc2cd75bc60b1bb86823646fe30
|
||||
0cb0f30603b1658ae24d1b74d6ab59d05ef4e448
|
Loading…
Reference in New Issue
Block a user