home *** CD-ROM | disk | FTP | other *** search
- @echo off
- rem =======================================================================
- rem
- rem BUILD.BAT
- rem
- rem Builds demo application
- rem
- rem Syntax: build [debug16 / ndebug16 / debug32 /ndebug32]
- rem
- rem =======================================================================
- rem
-
-
- rem --- Check for environment space ---
- set typ=d16
- set ok=N
-
- if NOT "%ok%" == "N" goto err_env
-
-
- rem --- Parse arguments ---
- :parse
- if "%1" == "" goto check
- if "%1" == "clean" goto clean
- if "%1" == "debug16" goto debug16
- if "%1" == "debug32" goto debug32
- if "%1" == "ndebug16" goto ndebug16
- if "%1" == "ndebug32" goto ndebug32
- shift
- goto parse
-
- rem --- Handle "clean" ---
- :clean
- set CLEAN=Y
- shift
- goto parse
-
- rem --- Handle "debug16" ---
- :debug16
- if "%ok%" == "Y" goto err_usage
- set ok=Y
- set typ=d16
- shift
- goto parse
-
- rem --- Handle "debug32" ---
- :debug32
- if "%ok%" == "Y" goto err_usage
- set ok=Y
- set typ=d32
- shift
- goto parse
-
- rem --- Handle "ndebug16" ---
- :ndebug16
- if "%ok%" == "Y" goto err_usage
- set ok=Y
- set typ=n16
- shift
- goto parse
-
- rem --- Handle "ndebug32" ---
- :ndebug32
- if "%ok%" == "Y" goto err_usage
- set ok=Y
- set typ=n32
- shift
- goto parse
-
- rem --- Verify correctness of everything ---
- :check
- if NOT "%ok%" == "Y" goto err_usage
- goto doit
-
- rem --- Make the demo ---
- :doit
- if "%typ%" == "n16" nmake
- if "%typ%" == "d16" nmake DEBUG=YES
- if "%typ%" == "n32" nmake WIN32=YES
- if "%typ%" == "d32" nmake WIN32=YES DEBUG=YES
- goto end
-
- rem --- Out of environment space ---
- :err_env
- echo.
- echo Error: out of environment space
- echo.
- goto end
-
- rem --- Usage message ---
- :err_usage
- echo.
- echo Usage: BUILD [debug16 / ndebug16 / debug32 / ndebug32]
- echo.
- echo Note: Make sure that your Windows and ODBC SDK environment
- echo is setup properly.
- echo.
- goto end
-
- rem --- Clear environment variables ---
- :end
- set typ=
- set ok=
- set clean=