# Makefile for nmake on Windows.
#
# Usage:
#
# nmake /f Makefile.msc wapptclsh.exe TCLDIR=C:\Tcl
#
# Must have a build of TCL9 installed in whatever directory
# the TCLDIR= argument points to. To build TCL:
#
# (1) Download and untar the source tree for TCL9
# (2) CD into the win/ subdirectory
# (3) nmake /f makefile.vc release
# (4) nmake /f makefile.vc INSTALLDIR=C:\Tcl install
#
# Substitute whatever directory you want in place of C:\Tcl
#
CFLAGS = -nologo -MT -fp:precise
CC = cl $(CFLAGS)
OPTS = -DSQLITE_ENABLE_DESERIALIZE
!IFNDEF TCLDIR
TCLDIR = C:\Tcl
!ENDIF
TCLLIB = $(TCLDIR)\lib\tcl90.lib
TCLINC = $(TCLDIR)\include
TCLSH = $(TCLDIR)\bin\tclsh90.exe
all: wapptclsh.exe
wapptclsh.exe: wapptclsh.c
$(CC) -I. -I$(TCLINC) -Zi /Fe$@ $(OPTS) wapptclsh.c /link /OUT:wapptclsh.exe $(TCLLIB)
wapptclsh.c: wapptclsh.c.in wapp.tcl wapptclsh.tcl tclsqlite3.c mkccode.tcl
$(TCLSH) mkccode.tcl wapptclsh.c.in >$@
clean:
del /Q wapptclsh.exe wapptclsh.c