nmake -f win32\Makefile.msc
Archive for category apache
cd contrib\masmx86 bld_ml32 cd ..\.. ML /coff /Zi /c contrib\masmx86\match686.asm NMAKE -f win32\Makefile.msc LOC="-D_CRT_SECURE_NO_DEPRECATE /wd4996 -DASMV" OBJA="match686.obj" MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2
I use PHP on the command line cause I know it the syntax better than any other scriting language and it works on linux and windows. This is about removing the x86 to be able to build apache in x64 (64 bit) on windows.
<?php
$files=array(
"srclib/apr/libapr.mak",
"srclib/apr-iconv/build/modules.mk.win",
"srclib/apr-iconv/libapriconv.mak",
"srclib/apr-util/dbd/apr_dbd_freetds.mak",
"srclib/apr-util/dbd/apr_dbd_mysql.mak",
"srclib/apr-util/dbd/apr_dbd_odbc.mak",
"srclib/apr-util/dbd/apr_dbd_oracle.mak",
"srclib/apr-util/dbd/apr_dbd_pgsql.mak",
"srclib/apr-util/dbd/apr_dbd_sqlite2.mak",
"srclib/apr-util/dbd/apr_dbd_sqlite3.mak",
"srclib/apr-util/dbm/apr_dbm_db.mak",
"srclib/apr-util/dbm/apr_dbm_gdbm.mak",
"srclib/apr-util/ldap/apr_ldap.mak",
"srclib/apr-util/libaprutil.mak"
);
foreach($files as $file){
if(file_exists($file)){
echo "Replace in: ". $file ."\n\r";
file_put_contents($file,str_ireplace(" /MACHINE:X86","",file_get_contents($file)));
}
else
{
echo "FAILED: ". $file ."\n\r";
}
}
?>
Needed tools
- VC 2008 Express (Installer Compiler and Express SDK) [silverlight & sql server not needed]
- Perl 5.8 or newer
- GNU Tools
- NASM
Sources
- apache unix source code
- apr-iconv
- openssl [lastest] stable
- zlib 1.2.3
Unix sources require a couple steps to prep source first. Once they are untarred on the hard drive.
create a folder.
C:\builds
extract apache sourcecode into it.
e.g.
C:\builds\httpd-2.2.14
unpack zlib-1.2.3.tar.gz and move it into C:\builds\httpd-2.2.14\srclib\zlib
unpack apr-iconv-1.2.1.tar.gz and move it intoC:\builds\httpd-2.2.14\srclib\apr-iconv
unpackopenssl-0.9.8l.tar.gz and move it into C:\builds\httpd-2.2.14\srclib\openssl
open cmd
cd \
cd builds\httpd*
“C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat”
del /s /q *.sln *.vcproj*
srclib\apr\build\lineends.pl
zip -R dsps.zip “*.dsp” “*.dsw”
unzip -a -o dsps.zip
srclib\apr\build\cvtdsp.pl -2005
cd srclib\zlib
ML /coff /Zi /c contrib\masm686\match.asm
NMAKE -f win32\Makefile.msc LOC=”-D_CRT_SECURE_NO_DEPRECATE /wd4996 -DASMV” OBJA=”match.obj”
MT -manifest zlib1.dll.manifest -outputresource:zlib1.dll;2
cd ../..
cd srclib\openssl
perl Configure VC-WIN32 –prefix=/Apache22 –openssldir=/Apache22/conf enable-camellia disable-idea
ms\do_nasm
nmake /f ms\ntdll.mak
—
edit test.bat remove md2 and idea test
—
nmake /f ms\ntdll.mak test
close the console.
Open Apache.dsw with VS8/VS9 and answer “Yes to All” to the “convert projects” question
Close the Apache.dsw solution in VS8/VS9 and open Apache.sln
Select relase win32
Now build InstallBin
Test your build
Archives by Subject:
- Categories
Archives by Month:
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009