# Makefile.vc
#
# This makefile is suitable for use with # Microsoft Visual C++ 2.x and 4.0.
#
# This makefile was hacked from Sun's 'example.zip'
# Copyright (c) 1996 Sun Microsystems, Inc.
# SCCS: @(#) makefile.vc 1.3 96/04/24 13:28:08
# Copyright 1997 Tom Poindexter.
#

ORATCL_VERSION = 2.6
DLL_VERSION = 26

PROJECT = oratcl$(DLL_VERSION)

#
# Project directories -- these may need to be customized for your site
#
# ROOT --       location of the example files.
# TMPDIR --     location for .obj files.
# TOOLS32 --    location of VC++ compiler installation.
# TCL --        location where Tcl is installed.
# TCLLIB --     define the Tcl lib (with correct version)
# ORACLE --     location of ORACLE lib, etc.
# ORACLE_LIB -- define the Oracle lib 

# note that the tcl  vclibs should have been unpacked in $(TCL)\lib !!

ROOT    = .
TMPDIR  = .
TOOLS32 = c:\msdev

# point TCL and TCLLIB to your tcl distribution

TCL     = c:\progra~1\tcl
TCLLIB  = $(TCL)\lib\tclstub81.lib

#TCL     = c:\progra~1\tcl80
#TCLLIB  = $(TCL)\lib\tcl80vc.lib


ORACLE     = c:\orant\oci80
ORACLE_LIB = $(ORACLE)\lib\msvc\ociw32.lib 



# comment the following line to compile with symbols
NODEBUG=1
VER=81

#
# Visual C++ tools
#

PATH=$(TOOLS32)\bin;$(PATH)

cc32    = $(TOOLS32)\bin\cl -I$(TOOLS32)\include
CP      = copy
RM      = del

INCLUDES = -I$(TOOLS32)\include -I$(TCL)\include 
DEFINES = -nologo $(DEBUGDEFINES) -DNO_BCOPY -DVERSION7 -DNONBLOCK_CURSOR  -DUSE_TCL_STUBS

!include <ntwin32.mak>

# 
# Global makefile settings
#

DLLOBJS = \
	$(TMPDIR)\oratcl.obj

# Targets

all: $(PROJECT).dll


$(PROJECT).dll: $(DLLOBJS)
	$(link) $(linkdebug) $(dlllflags) $(ORACLE_LIB) $(TCLLIB) \
		$(guilibsdll) -out:$(PROJECT).dll $(DLLOBJS)

# Implicit Targets

.c.obj:
	$(cc32) $(cdebug) $(cflags) $(cvarsdll) $(INCLUDES) \
		$(DEFINES) -Fo$(TMPDIR)\ $<

clean:
	-$(RM) $(TMPDIR)\*.obj
	-$(RM) $(PROJECT).dll
	-$(RM) $(PROJECT).lib
	-$(RM) $(PROJECT).exp
					      
