diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-25 21:55:46 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-25 21:55:46 +0000 |
commit | f581c91677797e22876684d639f3cf5190a5ab51 (patch) | |
tree | 96de4050b7befffb3df352ad1de6a1f0e0bd5763 /ddk_build.cmd | |
parent | 95eccbda1fe6e9b95af3a1b998d52f44721aaf19 (diff) | |
download | libusb-f581c91677797e22876684d639f3cf5190a5ab51.tar.gz |
r114: sources update and build script (Orin Eman)
OACR 28719 warning removal (Orin Eman)
minor code cleanup
Diffstat (limited to 'ddk_build.cmd')
-rw-r--r-- | ddk_build.cmd | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/ddk_build.cmd b/ddk_build.cmd new file mode 100644 index 0000000..4ff6c02 --- /dev/null +++ b/ddk_build.cmd @@ -0,0 +1,61 @@ +@echo off +if Test%BUILD_ALT_DIR%==Test goto usage + +set version=1.0 + +cd libusb\os +copy /y ..\..\msvc\libusb-%version%.rc . +@echo on +build -cZ +@echo off +if errorlevel 1 goto builderror +del libusb-%version%.rc +cd ..\.. + +set cpudir=i386 +set destType=Win32 +if %_BUILDARCH%==x86 goto isI386 +set cpudir=amd64 +set destType=x64 +:isI386 + +set srcPath=libusb\os\obj%BUILD_ALT_DIR%\%cpudir% + +set dstPath=%destType%\Debug +if %_BuildType%==chk goto isDebug +set dstPath=%destType%\Release +:isDebug + +if exist %destType% goto md2 +mkdir %destType% +:md2 +if exist %dstPath% goto md3 +mkdir %dstPath% +:md3 +if exist %dstPath%\dll goto md4 +mkdir %dstPath%\dll +:md4 +if exist %dstPath%\lib goto md5 +md %dstPath%\lib +:md5 +@echo on + +copy %srcPath%\libusb-%version%.dll %dstPath%\dll +copy %srcPath%\libusb-%version%.pdb %dstPath%\dll +copy %srcPath%\libusb-%version%.lib %dstPath%\lib + +@echo off +goto done + + +:builderror +del libusb-%version%.rc +cd ..\.. +echo Build failed +goto done + +:usage +echo ddk_build must be run in a WDK build environment +goto done + +:done
\ No newline at end of file |