#!/usr/bin/make

CFLAGS = -Os -static
CC = gcc $(CFLAGS)
OPTS = -DSQLITE_ENABLE_DESERIALIZE
TCLLIB = /home/drh/tcl/lib/libtcl8.7.a -lm -lz -lpthread -ldl
TCLINC = /home/drh/tcl/include
TCLSH = tclsh

all: w3tclsh

w3tclsh: w3tclsh.c
	$(CC) -I. -I$(TCLINC) -o $@ $(OPTS) w3tclsh.c $(TCLLIB)

w3tclsh.c:	w3tclsh.c.in w3.tcl w3tclsh.tcl tclsqlite3.c mkccode.tcl
	$(TCLSH) mkccode.tcl w3tclsh.c.in >$@

clean:	
	rm w3tclsh w3tclsh.c
