#!/usr/bin/make

CC = gcc -O0 -framework CoreFoundation
TCLLIB = /Users/drh/tcl/lib/libtcl8.7.a -lm -lz -lpthread -ldl
TCLINC = /Users/drh/tcl/include
TCLSH = /Users/drh/tcl/bin/tclsh8.7

all: w3tclsh

w3tclsh: w3tclsh.c
	$(CC) -I. -I$(TCLINC) -o $@ 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
