| 1 |
@echo off
|
| 2 |
|
| 3 |
rem $Id: makemod.bat,v 1.1 2008/01/08 04:19:48 tessus Exp $
|
| 4 |
|
| 5 |
rem SCRIPT: makemod.bat
|
| 6 |
rem Builds the mod_auth_ibmdb2 module with Visual Studio C/C++ Compiler
|
| 7 |
rem Usage: makemod.bat
|
| 8 |
|
| 9 |
rem Set DB2PATH to where DB2 will be accessed.
|
| 10 |
rem Set APACHEPATH to where Apache2 is installed
|
| 11 |
|
| 12 |
rem Path settings
|
| 13 |
|
| 14 |
set DB2PATH=c:\sqllib
|
| 15 |
set APACHEPATH=C:\Apache
|
| 16 |
|
| 17 |
rem Compiler and Linker Settings
|
| 18 |
|
| 19 |
set CC=cl
|
| 20 |
set DEFS= /nologo /MT /W3 /EHsc
|
| 21 |
set OUT=mod_auth_ibmdb2.so
|
| 22 |
set LINKER=link -nologo
|
| 23 |
|
| 24 |
set APACHEINC=-I"%APACHEPATH%\include"
|
| 25 |
set DB2INC=-I"%DB2PATH%\include"
|
| 26 |
|
| 27 |
set INCLUDES=%APACHEINC% %DB2INC%
|
| 28 |
|
| 29 |
set MDEFS=-D_CONSOLE -D_MBCS -DWIN32 -DWINNT -Di386
|
| 30 |
|
| 31 |
set DEFINES= %INCLUDES% %DEFS% %MDEFS%
|
| 32 |
set CFLAGS= %DEFINES%
|
| 33 |
|
| 34 |
set APACHE_LIB="%APACHEPATH%\lib"
|
| 35 |
|
| 36 |
set LIB=%APACHE_LIB%;%LIB%
|
| 37 |
set LIBS=kernel32.lib libhttpd.lib libapr.lib libaprutil.lib "%DB2PATH%\lib\db2cli.lib"
|
| 38 |
|
| 39 |
|
| 40 |
%CC% %CFLAGS% -c mod_auth_ibmdb2.c
|
| 41 |
|
| 42 |
%CC% %CFLAGS% -LD %LIBS% mod_auth_ibmdb2.obj -Fe%OUT%
|
| 43 |
|
| 44 |
copy %OUT% "%APACHEPATH%\modules"
|
| 45 |
@echo on
|