| @echo off | |
| @rem ************************************************************************** | |
| @rem * --== WARNING ==-- This is a generated file. Do not edit! | |
| @rem * | |
| @rem * From this directory, run this batch file like so: | |
| @rem * | |
| @rem * .\build_neon debug|release (rebuild) | |
| @rem * | |
| @rem ************************************************************************** | |
| [if-any zlib_path] | |
| @rem ************************************************************************** | |
| @rem ZLib support | |
| set ZLIB_SRC=[zlib_path][end] | |
| [if-any openssl_path] | |
| @rem ************************************************************************** | |
| @rem OpenSSL support | |
| set OPENSSL_SRC=[openssl_path][end] | |
| @rem ************************************************************************** | |
| @rem The normal compilation of Neon on Windows is designed to compile | |
| @rem and link against the pre-compiled Windows binary Expat | |
| @rem installation and uses the EXPAT_SRC command line parameter to | |
| @rem 'neon /f neon.mak' to specify where this binary installation | |
| @rem resides. However, here, Neon is instructed to compile and link | |
| @rem against the Expat packages with APR, and the EXPAT_FLAGS | |
| @rem parameter must be used instead of EXPAT_SRC. | |
| set EXPAT_FLAGS="/I ../apr-util/xml/expat/lib /D HAVE_EXPAT /D HAVE_EXPAT_H" | |
| @rem ************************************************************************** | |
| cd ..\..\neon | |
| set exitcode=0 | |
| if "%2" == "rebuild" goto clean | |
| if not "%2" == "" goto pIIerr | |
| set target=ALL | |
| goto mode | |
| :clean | |
| set target=CLEAN ALL | |
| :mode | |
| if "%1" == "release" goto release | |
| if "%1" == "debug" goto debug | |
| goto pIerr | |
| @rem ************************************************************************** | |
| :release | |
| @echo nmake /f neon.mak %target% EXPAT_FLAGS=%EXPAT_FLAGS% | |
| nmake /nologo /f neon.mak %target% EXPAT_FLAGS=%EXPAT_FLAGS% | |
| if not errorlevel 0 goto err | |
| goto end | |
| @rem ************************************************************************** | |
| :debug | |
| @echo nmake /f neon.mak %target% EXPAT_FLAGS=%EXPAT_FLAGS% DEBUG_BUILD=Aye | |
| nmake /nologo /f neon.mak %target% EXPAT_FLAGS=%EXPAT_FLAGS% DEBUG_BUILD=Aye | |
| if not errorlevel 0 goto err | |
| goto end | |
| @rem ************************************************************************** | |
| :pIerr | |
| echo error: First parameter should be "release" or "debug" | |
| goto err | |
| @rem ************************************************************************** | |
| :pIIerr | |
| echo error: Second parameter should be "rebuild" or empty | |
| goto err | |
| @rem ************************************************************************** | |
| :err | |
| set exitcode=1 | |
| :end | |
| exit %exitcode% |