summaryrefslogtreecommitdiffstats
path: root/build-apache2.bat
blob: f44109c6d5672cb4b79613db08e11ef60f00ea0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@echo off
rem path to Microsoft SDK installation
SET DIR_MSSDK=C:\Program Files\Microsoft SDK
rem path to apache2 installation
SET DIR_APACHE=C:\Program Files\Apache Group\Apache2
rem path to mysql 4.0 installation
SET DIR_MYSQL=C:\MySQL
rem Can be set to opt or debug
SET LIB_MYSQL=opt

copy /Y winconfig.h config.h
mkdir Release
cd Release
Rem Compile all the source code
echo /MD /W3 /Zi /O2 /DNDEBUG /D_WINDOWS /DWIN32 > RESP_c.txt
echo /Fd"mod_log_sql" /FD >> RESP_c.txt
echo /DHAVE_CONFIG_H /DWITH_APACHE20 /DLOGSQL_DECLARE_EXPORT >> RESP_c.txt
echo /I.. >> RESP_c.txt
echo /I"%DIR_MSSDK%\Include" >> RESP_c.txt
echo /I"%DIR_APACHE%\Include" >> RESP_c.txt
echo /I"%DIR_MYSQL%\Include" >> RESP_c.txt
cl @RESP_c.txt /c ..\mod_log_sql.c ..\mod_log_sql_mysql.c

rem link main module
echo /MACHINE:I386 /SUBSYSTEM:windows > RESP_l.txt
echo /OUT:mod_log_sql.so /DLL /OPT:REF /DEBUG >> RESP_l.txt
echo /LIBPATH:"%DIR_APACHE%\lib" >> RESP_l.txt
echo libapr.lib libaprutil.lib libhttpd.lib >> RESP_l.txt
link @RESP_l.txt mod_log_sql.obj

rem link mysql module
echo /MACHINE:I386 /SUBSYSTEM:windows > RESP_l.txt
echo /OUT:mod_log_sql_mysql.so /DLL /OPT:REF /DEBUG >> RESP_l.txt
echo /LIBPATH:"%DIR_APACHE%\lib" >> RESP_l.txt
echo /LIBPATH:"%DIR_MYSQL%\lib\%LIB_MYSQL%" >> RESP_l.txt
echo /NODEFAULTLIB:LIBCMT.lib >> RESP_l.txt
echo libapr.lib libaprutil.lib libhttpd.lib >> RESP_l.txt
echo libmysql.lib mod_log_sql.lib >> RESP_l.txt
link @RESP_l.txt mod_log_sql_mysql.obj
cd ..