diff options
Diffstat (limited to 'ddk_build.cmd')
-rw-r--r-- | ddk_build.cmd | 70 |
1 files changed, 49 insertions, 21 deletions
diff --git a/ddk_build.cmd b/ddk_build.cmd index e51d939..06ddcec 100644 --- a/ddk_build.cmd +++ b/ddk_build.cmd @@ -1,16 +1,11 @@ @echo off -if Test%BUILD_ALT_DIR%==Test goto usage -set version=1.0 +@rem ==================== setup ====================== -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 ..\.. +@rem Compatibility with older DDK environments: +if defined DDKBUILDENV set _BuildType=%DDKBUILDENV% + +if Test%BUILD_ALT_DIR%==Test goto usage set cpudir=i386 set destType=Win32 @@ -19,8 +14,6 @@ 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 @@ -38,9 +31,26 @@ mkdir %dstPath%\dll if exist %dstPath%\lib goto md5 md %dstPath%\lib :md5 -if exist %dstPath%\examples goto md6 -md %dstPath%\examples +if exist %dstPath%\sys goto md6 +md %dstPath%\sys :md6 +if exist %dstPath%\examples goto md7 +md %dstPath%\examples +:md7 + +@rem ==================== libusb ====================== +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 srcPath=libusb\os\obj%BUILD_ALT_DIR%\%cpudir% @echo on copy %srcPath%\libusb-%version%.dll %dstPath%\dll @@ -49,12 +59,29 @@ copy %srcPath%\libusb-%version%.lib %dstPath%\lib @echo off -if exist examples\lsusb_ddkbuild goto md7 +@rem ==================== libusb0.sys ====================== +cd libusb\os\driver +@echo on +build -cZ +@echo off +if errorlevel 1 goto buildlsusberror +cd ..\..\.. + +set srcPath=libusb\os\driver\obj%BUILD_ALT_DIR%\%cpudir% +@echo on + +copy %srcPath%\libusb0.sys %dstPath%\sys + +@echo off + +@rem ==================== example lsusb ====================== +if exist examples\lsusb_ddkbuild goto md8 md examples\lsusb_ddkbuild -:md7 +:md8 cd examples\lsusb_ddkbuild copy ..\lsusb_sources sources +copy ..\makefile makefile @echo on build -cZ @echo off @@ -69,12 +96,14 @@ copy %srcPath%\lsusb.pdb %dstPath%\examples @echo off -if exist examples\xusb_ddkbuild goto md8 +@rem ==================== example xusb ====================== +if exist examples\xusb_ddkbuild goto md9 md examples\xusb_ddkbuild -:md8 +:md9 cd examples\xusb_ddkbuild copy ..\xusb_sources sources +copy ..\makefile makefile @echo on build -cZ @echo off @@ -89,10 +118,9 @@ copy %srcPath%\xusb.pdb %dstPath%\examples @echo off - +@rem ==================== cleanup ====================== goto done - :builderror del libusb-%version%.rc cd ..\.. @@ -113,4 +141,4 @@ goto done echo ddk_build must be run in a WDK build environment goto done -:done
\ No newline at end of file +:done |