#!/usr/bin/make

CC = gcc -O0 -framework CoreFoundation
TCLLIB = /Users/drh/tcl/tcl9/lib/libtcl9.0.a -lm -lz -lpthread -ldl
TCLINC = /Users/drh/tcl/tcl9/include
TCLSH = /Users/drh/tcl/tcl9/bin/tclsh9.0

all: wapptclsh

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

wapptclsh.c:	wapptclsh.c.in wapp.tcl wapptclsh.tcl tclsqlite3.c mkccode.tcl
	$(TCLSH) mkccode.tcl wapptclsh.c.in >$@

clean:	
	rm wapptclsh wapptclsh.c
