Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/libusb/src/msvc/ddk_build.cmd

Issue 19713005: Update libusb 1.0.9 to libusbx 1.0.16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 @rem default builds static library.
2 @rem you can pass the following arguments (case insensitive):
3 @rem - "DLL" to build a DLL instead of a static library
4 @rem - "/MT" to build a static library compatible with MSVC's /MT option (LIBCMT vs MSVCRT)
5 @echo off 1 @echo off
2 ::# default builds static library.
3 ::# you can pass the following arguments (case insensitive):
4 ::# - "DLL" to build a DLL instead of a static library
5 ::# - "/MT" to build a static library compatible with MSVC's /MT option (LIBCMT vs MSVCRT)
6 6
7 if Test%BUILD_ALT_DIR%==Test goto usage 7 if Test%BUILD_ALT_DIR%==Test goto usage
8 8
9 rem process commandline parameters 9 ::# process commandline parameters
10 set TARGET=LIBRARY 10 set TARGET=LIBRARY
11 set STATIC_LIBC= 11 set STATIC_LIBC=
12 set version=1.0 12 set version=1.0
13 set PWD=%~dp0
14 set BUILD_CMD=build -bcwgZ -M2
13 15
14 if "%1" == "" goto no_more_args 16 if "%1" == "" goto no_more_args
15 rem /I for case insensitive 17 ::# /I for case insensitive
16 if /I Test%1==TestDLL set TARGET=DYNLINK 18 if /I Test%1==TestDLL set TARGET=DYNLINK
17 if /I Test%1==Test/MT set STATIC_LIBC=1 19 if /I Test%1==Test/MT set STATIC_LIBC=1
18 :no_more_args 20 :no_more_args
19 21
20 cd ..\libusb\os 22 cd ..\libusb\os
21 echo TARGETTYPE=%TARGET% > target 23 echo TARGETTYPE=%TARGET% > target
22 copy target+..\..\msvc\libusb_sources sources >NUL 2>&1 24 copy target+..\..\msvc\libusb_sources sources >NUL 2>&1
23 del target 25 del target
24 @echo on 26 @echo on
25 build -cwgZ 27 %BUILD_CMD%
26 @echo off 28 @echo off
27 if errorlevel 1 goto builderror 29 if errorlevel 1 goto builderror
28 cd ..\.. 30 cd ..\..
29 31
30 set cpudir=i386 32 set cpudir=i386
31 set destType=Win32 33 set destType=Win32
32 if %_BUILDARCH%==x86 goto isI386 34 if %_BUILDARCH%==x86 goto isI386
33 set cpudir=amd64 35 set cpudir=amd64
34 set destType=x64 36 set destType=x64
35 :isI386 37 :isI386
(...skipping 30 matching lines...) Expand all
66 68
67 @echo off 69 @echo off
68 70
69 if exist examples\listdevs_ddkbuild goto md7 71 if exist examples\listdevs_ddkbuild goto md7
70 md examples\listdevs_ddkbuild 72 md examples\listdevs_ddkbuild
71 :md7 73 :md7
72 74
73 cd examples\listdevs_ddkbuild 75 cd examples\listdevs_ddkbuild
74 copy ..\..\msvc\listdevs_sources sources >NUL 2>&1 76 copy ..\..\msvc\listdevs_sources sources >NUL 2>&1
75 @echo on 77 @echo on
76 build -cwgZ 78 %BUILD_CMD%
77 @echo off 79 @echo off
78 if errorlevel 1 goto buildlistdevserror 80 if errorlevel 1 goto builderror
79 cd ..\.. 81 cd ..\..
80 82
81 set srcPath=examples\listdevs_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir% 83 set srcPath=examples\listdevs_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
82 @echo on 84 @echo on
83 85
84 copy %srcPath%\listdevs.exe %dstPath%\examples 86 copy %srcPath%\listdevs.exe %dstPath%\examples
85 copy %srcPath%\listdevs.pdb %dstPath%\examples 87 copy %srcPath%\listdevs.pdb %dstPath%\examples
86 88
89 @echo off
90
91 if exist examples\xusb_ddkbuild goto md8
92 md examples\xusb_ddkbuild
93 :md8
94
95 cd examples\xusb_ddkbuild
96 copy ..\..\msvc\xusb_sources sources >NUL 2>&1
97 @echo on
98 %BUILD_CMD%
99 @echo off
100 if errorlevel 1 goto builderror
101 cd ..\..
102
103 set srcPath=examples\xusb_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
104 @echo on
105
106 copy %srcPath%\xusb.exe %dstPath%\examples
107 copy %srcPath%\xusb.pdb %dstPath%\examples
108
109 @echo off
110
111 if exist examples\getopt\getopt_ddkbuild goto md9
112 md examples\getopt\getopt_ddkbuild
113 :md9
114
115 cd examples\getopt\getopt_ddkbuild
116 copy ..\..\..\msvc\getopt_sources sources >NUL 2>&1
117 @echo on
118 %BUILD_CMD%
119 @echo off
120 if errorlevel 1 goto builderror
121 cd ..\..\..
122
123 if exist examples\fxload_ddkbuild goto md10
124 md examples\fxload_ddkbuild
125 :md10
126
127 cd examples\fxload_ddkbuild
128 copy ..\..\msvc\fxload_sources sources >NUL 2>&1
129 @echo on
130 %BUILD_CMD%
131 @echo off
132 if errorlevel 1 goto builderror
133 cd ..\..
134
135 set srcPath=examples\fxload_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
136 @echo on
137
138 copy %srcPath%\fxload.exe %dstPath%\examples
139 copy %srcPath%\fxload.pdb %dstPath%\examples
140
141 @echo off
142
143 if exist examples\hotplugtest_ddkbuild goto md11
144 md examples\hotplugtest_ddkbuild
145 :md11
146
147 cd examples\hotplugtest_ddkbuild
148 copy ..\..\msvc\hotplugtest_sources sources >NUL 2>&1
149 @echo on
150 %BUILD_CMD%
151 @echo off
152 if errorlevel 1 goto builderror
153 cd ..\..
154
155 set srcPath=examples\hotplugtest_ddkbuild\obj%BUILD_ALT_DIR%\%cpudir%
156 @echo on
157
158 copy %srcPath%\hotplugtest.exe %dstPath%\examples
159 copy %srcPath%\hotplugtest.pdb %dstPath%\examples
160
161 @echo off
162
87 cd msvc 163 cd msvc
88 goto done 164 goto done
89 165
90
91 :builderror
92 cd ..\..\msvc
93 echo Build failed
94 goto done
95
96 :buildlistdevserror
97 cd ..\..\msvc
98 echo listdevs build failed
99 goto done
100
101 :usage 166 :usage
102 echo ddk_build must be run in a WDK build environment 167 echo ddk_build must be run in a WDK build environment
103 pause 168 pause
104 goto done 169 goto done
105 170
171 :builderror
172 echo Build failed
173
106 :done 174 :done
175 cd %PWD%
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698