summaryrefslogtreecommitdiff
path: root/buildwin.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'buildwin.cmd')
-rw-r--r--buildwin.cmd13
1 files changed, 9 insertions, 4 deletions
diff --git a/buildwin.cmd b/buildwin.cmd
index 4a6eb8d..f503984 100644
--- a/buildwin.cmd
+++ b/buildwin.cmd
@@ -1,6 +1,6 @@
@echo off
REM # buildwin.cmd
-REM # build ipmiutil for windows
+REM # build ipmiutil for windows, detecting 32-bit/64-bit from LIBPATH
REM #
REM # First download a copy of getopt.c getopt.h.
REM # copy getopt.* util
@@ -21,9 +21,15 @@ REM check for ssl libs
REM check for ssl includes
REM call mkssl
-set UTMAKE=ipmiutil.mak
+
echo %LIBPATH% |findstr /C:64 >NUL
-if %errorlevel% EQU 0 set UTMAKE=ipmiutil64.mak
+if %errorlevel% EQU 0 (
+ set MARCH=X64
+ set UTMAKE=ipmiutil64.mak
+) else (
+ set MARCH=IX86
+ set UTMAKE=ipmiutil.mak
+)
cd lib
nmake /nologo -f ipmilib.mak all
@@ -43,4 +49,3 @@ echo First need to run vcvars.bat
echo Check that VCINSTALLDIR and LIBPATH are correct
:done
-