#------------------------------------------
# wish -- TK 3.6 Interpreter for Windows
#------------------------------------------
BC4DRIVE=e
#WINLINK=tlink /v /m /c /C /n /Tw /Lc:\borlandc\lib;..\src /ml c0wl
#WINRC=rc -r -ic:\borlandc\include
WINLINK=tlink /v /m /c /C /n /Tw /L$(BC4DRIVE):\bc4\lib;..\src /ml c0wl
WINRC=rc -r -i$(BC4DRIVE):\bc4\include

WINCC=bcc -c -w-par -P -W -2 -ml -I..\src -I$(BC4DRIVE):\bc4\include -DTCL_MSDOS_PORT
WINLIB= import tcl mathwl cwl
DIST_DIR=c:\fedloc\dist

all:	wish.exe errfix.exe

install:	wish.exe
     copy wish.exe $(DIST_DIR)\wish.exe
     copy wish.sym $(DIST_DIR)\wish.sym
     copy errfix.exe $(DIST_DIR)\errfix.exe

errfix.exe: 	errfix.c
     bcc errfix.c

wish.exe : wish.obj wish.def wish.res ..\src\tcl.lib
     $(WINLINK) wish, wish, wish, $(WINLIB), wish.def
#     $(WINLINK) wish, wish, NUL, $(WINLIB), wish.def
     rc -t wish.res
     buildsym wish.exe

wish.obj : wish.c wish.h
     $(WINCC) wish.c

wish.res : wish.rc wish.h wish.ico
     $(WINRC) wish.rc

clean:
	rm -f wish.obj wish.res wish.map

clobber: clean
	rm -f wish.exe
