ndkbuild bat for Windows

@echo off
 
REM Store the system path here.
set temp_path=%PATH%
REM **************************************************************************
REM Please set your ndk-build,cygwin path here
set ndk_build_path=D:\android\ndk\android-ndk-r4-windows\android-ndk-r4\ndk-build
set cygwin_path=C:\cygwin\bin\;
REM **************************************************************************
 
REM **************************************************************************
REM Set the ndk-build,cygwin path
path=%ndk_build_path%;%cygwin_path%
REM **************************************************************************
 
if not EXIST jni\Android.mk goto error
if "%1" == "" goto help
 
if "%1" == "build" goto build 
 
if "%1" == "clean" goto clean
 
goto help
 
:build
echo start ndk-build
 bash %ndk_build_path%
goto end
 
:clean
echo clean
echo rm bin libs -rf
rm bin libs -rf
goto end
 
:error
echo Can't find jni/Android.mk,please check the direcotry.
echo If you have any problem,please contact pengjianqing,thanks,20101115.
goto end
 
:help
echo Wrong parameter,should be "build" or "clean"
echo Example:
echo "ndkbuild build" or "ndkbuild clean"
echo If you have any problem,please contact pengjianqing,thanks,20101115.
goto exit
 
:end
echo DONE!
 
:exit
 
REM Restore the system path.
path=%temp_path%