@echo off 
REM
REM Copyright (c) 2000 by Oracle Corporation. All Rights Reserved.
REM

Rem Use this script to create executables for the demo scripts with PL/SQL
Rem blocks embedded in C code.  To create all executables, at the prompt type:

if (%1) == () goto usage

Rem MSVCDir is defined by running a batch file, vcvars32.bat, 
Rem in Microsoft Visual Studio directory.  You can find it using 
Rem Windows Explorer.
Rem Environment Check:
if (%MSVCDir%) == () goto msvcdir_error

echo This makefile assumes demos are installed as user scott

REM 
REM Precompile First
REM 
proc parse=full char_map=varchar2 ireclen=132 sqlcheck=full,DBMS=V7 user=scott/tiger iname=%1.pc include="d:\oracle\ora81\oci\include" include="d:\oracle\ora81\precomp\public" include="%MSVCDir%\include"

REM
REM  Linking
REM 
cl -Id:\oracle\ora81\oci\include -Id:\oracle\ora81\precomp\public -I. -I%MSVCDir%\include -D_MT -D_DLL -Zi %1.c /link /LIBPATH:d:\oracle\ora81\oci\lib\msvc\oci.lib d:\oracle\ora81\precomp\lib\msvc\oraSQL8.LIB d:\oracle\ora81\precomp\lib\orasql8.LIB /LIBPATH:%MSVCDir%\lib msvcrt.lib /nod:libc.lib
goto end

:usage
echo .
echo usage prcmake filename.pc [i.e. prcmake examp10]
echo .
goto end

:msvcdir_error
echo .
echo Environment variable MSVCDIR must be set before running this batch file.
echo Please run vcvars32.bat from MS Visual Studio directory.
echo .
goto end

:end
