home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 December
/
PCWorld_1998-12_cd.iso
/
software
/
sybase
/
ASA
/
asa60.exe
/
data1.cab
/
cxmp_files
/
makeall.bat
< prev
next >
Wrap
DOS Batch File
|
1998-07-27
|
8KB
|
204 lines
@echo off
rem
rem General Platform/Compiler Batch file for ALL
rem
if %1. == . goto usage
if %2. == . goto usage
if %3. == . goto usage
if %1. == /?. goto usage
if "%asany%" == "" goto noenv
SET program=%1
SET platform=%2
SET compiler=%3
SET extender=%4
if not %program% == cur goto notc
sqlpp -o %platform% cur.sqc
set pgm=cur
goto doneprogram
:notc
if not %program% == dcur goto notd
sqlpp -o %platform% dcur.sqc
set pgm=dcur
goto doneprogram
:notd
if not %program% == odbc goto noto
set pgm=odbc
goto doneprogram
:noto
goto usage
:doneprogram
goto %compiler%%platform%%extender%build
:usage
@echo off
echo Make All Examples Batch File
echo ****************************
echo.
echo Usage: %0 { Example } { Platform } { Compiler } [ DOS Extender ]
echo.
echo Example = CUR, DCUR, ODBC
echo Platform = WINDOWS, WINNT, OS232, NETWARE
echo Compiler = WC - Watcom, MC - Microsoft, BC - Borland, CS - IBM C Set++, TC - Turbo
echo.
echo ex. makeall cur os232 wc
echo makeall dcur winnt mc
echo makeall odbc windows wc
echo.
goto :done
:noenv
@echo off
echo The ASANY environment variable has not been set.
echo Please set it to point to the location of the
echo Adaptive Server Anywhere installation. For example:
echo set asany=c:\Program Files\Sybase\Adaptive Server Anywhere
goto :done
:WCWINDOWSbuild
wcc -d2 -zW -ml -w4 -bt=windows -I"%asany%\h" -I%watcom%\h\win %pgm%.c
wcc -d2 -zW -ml -w4 -bt=windows -I"%asany%\h" -I%watcom%\h\win mainwin.c
echo system windows >%pgm%.lnk
echo debug all >>%pgm%.lnk
echo file %pgm% >>%pgm%.lnk
echo file mainwin >>%pgm%.lnk
echo name %pgm%win >>%pgm%.lnk
echo option map >>%pgm%.lnk
echo option stack=10K >>%pgm%.lnk
echo option heap=20K >>%pgm%.lnk
echo library '%asany%\win\lib\dblibw.lib' >>%pgm%.lnk
echo library '%asany%\win\lib\odbc.lib' >>%pgm%.lnk
wlink @%pgm%.lnk
wrc -I%watcom%\h\win /bt=windows mainwin.rc %pgm%win
goto done
:BCWINDOWSbuild
bcc -v -I%asany%\h -D__WINDOWS__ -mm -W -c %pgm%.c
bcc -v -I%asany%\h -D__WINDOWS__ -mm -W -c mainwin.c
echo /v /Twe /c /n c0wm.obj %pgm%.obj mainwin.obj >%pgm%.lnk
echo %pgm%win >>%pgm%.lnk
echo %pgm%win >>%pgm%.lnk
rem echo %asany%\win\lib\dblibw.lib %asany%\win\lib\odbc.lib import cwm cm >>%pgm%.lnk
echo %asany%\win\lib\dblibw.lib import cwm cm %asany%\win\lib\odbc.lib import cwm cm >>%pgm%.lnk
tlink @%pgm%.lnk
copy mainwin.rc %pgm%win.rc
rc %pgm%win
goto done
:MCWINDOWSbuild
cl -c -AM -Gsw -W2 -D__WINDOWS__ -I%asany%\h %pgm%.c
cl -c -AM -Gsw -W2 -D__WINDOWS__ -I%asany%\h mainwin.c
echo name %pgm%win >%pgm%win.def
echo exetype windows >>%pgm%win.def
echo code preload moveable discardable >>%pgm%win.def
echo data preload moveable multiple >>%pgm%win.def
echo heapsize 1024 >>%pgm%win.def
echo stacksize 8192 >>%pgm%win.def
echo exports MainWndProc >>%pgm%win.def
link/noe %pgm%+mainwin,%pgm%win,,mlibcew.lib+%asany%\win\lib\dblibw.lib+%asany%\win\lib\odbc.lib+libw.lib,%pgm%win
copy mainwin.rc %pgm%win.rc
rc %pgm%win
goto done
:WCWINNTbuild
wcc386 -d2 -mf -w4 -bt=nt -dWINNT -dNTSERVICE -I"%asany%\h" -I%watcom%\h\nt %pgm%.c
wcc386 -d2 -mf -w4 -bt=nt -dWINNT -dNTSERVICE -I"%asany%\h" -I%watcom%\h\nt mainwin.c
wcc386 -d2 -mf -w4 -bt=nt -dWINNT -dNTSERVICE -I"%asany%\h" -I%watcom%\h\nt ntsvc.c
echo system nt_win >%pgm%.lnk
echo debug all >>%pgm%.lnk
echo file %pgm% >>%pgm%.lnk
echo file mainwin >>%pgm%.lnk
echo file ntsvc >>%pgm%.lnk
echo name %pgm%wnt >>%pgm%.lnk
echo option map >>%pgm%.lnk
echo option stack=64K >>%pgm%.lnk
echo library '%asany%\win32\lib\dblibtw.lib' >>%pgm%.lnk
echo library '%asany%\win32\lib\wodbc32.lib' >>%pgm%.lnk
rem * Comment in the following line to link directly
rem * to the ODBC driver, bypassing the ODBC driver manager
rem * and the Microsoft ODBC SDK. Comment out the line
rem * above.
rem echo library '%asany%\lib\wodbcntw.lib' >>%pgm%.lnk
wlink @%pgm%.lnk
wrc -k -bt=nt /I%watcom%\h\nt mainwin.rc %pgm%wnt.exe
goto done
:MCWINNTbuild
cl -c /Tp%pgm%.c /I"%asany%\h" /D__NT__ /DNTSERVICE /DWIN32 -W2
cl -c /Tpmainwin.c /I"%asany%\h" /D__NT__ /DNTSERVICE /DWIN32 -W2
cl -c /Tpntsvc.c /I"%asany%\h" /D__NT__ /DNTSERVICE /DWIN32 -W2
copy mainwin.rc %pgm%wnt.rc
rc %pgm%wnt
echo %pgm%.obj >%pgm%.lnk
echo mainwin.obj >>%pgm%.lnk
echo ntsvc.obj >>%pgm%.lnk
echo %pgm%wnt.res >>%pgm%.lnk
echo "%asany%\win32\lib\dblibtm.lib" >>%pgm%.lnk
echo "%asany%\win32\lib\odbc32.lib" >>%pgm%.lnk
echo advapi32.lib >>%pgm%.lnk
rem * Comment in the following line to link directly
rem * to the ODBC driver, bypassing the ODBC driver manager
rem * and the Microsoft ODBC SDK. Comment out the line
rem * above.
rem echo "%asany%\win32\lib\wodbcntm.lib" >>%pgm%.lnk
echo gdi32.lib >>%pgm%.lnk
echo user32.lib >>%pgm%.lnk
link /machine:i386 /subsystem:windows /out:%pgm%wnt.exe @%pgm%.lnk
goto done
:BCWINNTbuild
bcc32 -v -3 -c -DNTSERVICE -D__NT__ -I"%asany%\h" %pgm%.c mainwin.c ntsvc.c
echo /m /v /aa /c /Tpe c0w32.obj %pgm%.obj mainwin.obj ntsvc.obj >%pgm%.lnk
echo %pgm%wnt.exe >>%pgm%.lnk
echo %pgm%wnt.map >>%pgm%.lnk
echo "%asany%\win32\lib\dblibtb.lib" "%asany%\win32\lib\bodbc32.lib" cw32.lib import32.lib >>%pgm%.lnk
tlink32 @%pgm%.lnk
brc32 -k -w32 mainwin.rc %pgm%wnt.exe
goto done
:WCOS232build
wcc386 -D2 -mf -w4 -bt=os2 -I"%asany%\h" %pgm%.c
wcc386 -D2 -mf -w4 -bt=os2 -I"%asany%\h" mainch.c
echo system OS2V2 >%pgm%.lnk
echo debug all >>%pgm%.lnk
echo file %pgm% >>%pgm%.lnk
echo file mainch >>%pgm%.lnk
echo name %pgm%os2 >>%pgm%.lnk
echo option map >>%pgm%.lnk
echo option stack=10K >>%pgm%.lnk
echo library '%asany%\os2\lib\dblib2.lib' >>%pgm%.lnk
echo library '%asany%\os2\lib\wodbc2.lib' >>%pgm%.lnk
wlink @%pgm%.lnk
goto done
:BCOS232build
bcc -c -D__OS2__ -I%asany%\h %pgm%.c mainch.c
bcc -e%pgm%os2.exe %pgm%.obj mainch.obj %asany%\os2\lib\dblib2.lib %asany%\os2\lib\wodbc2.lib
goto done
:CSOS232build
icc /Fe%pgm%os2.exe /D__OS2__ /Sp1 /Ti+ /G4 /Ss+ /Fm+ /I%asany%\h %pgm%.c mainch.c %asany%\os2\lib\dblib2.lib %asany%\os2\lib\wodbc2.lib
goto done
:WCNETWAREbuild
if not [%program%] == [odbc] goto contnetware
echo.
echo ERROR: ODBC not supported for NetWare
echo.
goto done
:contnetware
wcc386 -D2 -ms -w4 -5s -bt=NetWare -I"%asany%\h" %pgm%.c
wcc386 -D2 -ms -w4 -5s -bt=NetWare -I"%asany%\h" mainch.c
echo SYSTEM NOVELL 'Sybase SQL Anywhere Embedded SQL Example' >%pgm%.lnk
echo debug all >>%pgm%.lnk
echo file %pgm% >>%pgm%.lnk
echo file mainch >>%pgm%.lnk
echo name %pgm%.nlm >>%pgm%.lnk
echo option map >>%pgm%.lnk
echo option stack=15K >>%pgm%.lnk
echo option copyright 'Copyright by Sybase, Inc. 1988-1995. All rights reserved.' >>%pgm%.lnk
echo library '%asany%\nlm\lib\dblibwsn.lib' >>%pgm%.lnk
echo libpath %watcom%\lib386 >>%pgm%.lnk
echo libpath %watcom%\lib386\netware >>%pgm%.lnk
echo module CLIB >>%pgm%.lnk
echo import @%watcom%\novi\clib.imp >>%pgm%.lnk
wlink @%pgm%.lnk
goto done
:done
SET program=
SET platform=
SET compiler=
SET extender=