
CC     =cl -nologo
CFLAGS =-Ox -W3 -MD
LD     =link -nologo
LDFLAGS=-dll

DEFS   =-DUSE_TCL_STUBS
INC    =-Ic:\opt\tcl\include
LIBS   =c:\opt\tcl\lib\tclstub84.lib ws2_32.lib

all: resolver.exe tclresolver.dll

resolver.exe: resolver.c
	$(CC) $(CFLAGS) -o $@ $**

tclresolver.dll: tclresolver.obj
	$(LD) $(LDFLAGS) -out:$@ $(LIBS) $**
.c.obj::
	$(CC) $(CFLAGS) $(DEFS) $(INC) -c @<<
$<
<<

clean:
	@if exist tclresolver.obj del tclresolver.obj

realclean: clean
	@if exist tclresolver.dll del tclresolver.dll
	@if exist tclresolver.exp del tclresolver.exp
	@if exist tclresolver.lib del tclresolver.lib
	@if exist resolver.exe del resolver.exe
