From 4dfb38430f77fcd91fc1eb9a3cf506690d014425 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sun, 20 Nov 2011 22:20:28 +0000 Subject: [PATCH] [wdk] use batch file in order to keep a Makefile --- sources => .msvc/rufus_sources | 0 GNUmakefile => Makefile | 0 wdk_build.cmd | 38 ++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) rename sources => .msvc/rufus_sources (100%) rename GNUmakefile => Makefile (100%) create mode 100644 wdk_build.cmd diff --git a/sources b/.msvc/rufus_sources similarity index 100% rename from sources rename to .msvc/rufus_sources diff --git a/GNUmakefile b/Makefile similarity index 100% rename from GNUmakefile rename to Makefile diff --git a/wdk_build.cmd b/wdk_build.cmd new file mode 100644 index 00000000..4eb43cd0 --- /dev/null +++ b/wdk_build.cmd @@ -0,0 +1,38 @@ +@echo off + +if Test%BUILD_ALT_DIR%==Test goto usage + +::# /M 2 for multiple cores +set BUILD_CMD=build -bcwgZ -M2 +set PWD=%~dp0 + +::# Set target platform type +set ARCH_DIR=%_BUILDARCH% +if /I Test%_BUILDARCH%==Testx86 set ARCH_DIR=i386 + +if EXIST Makefile ren Makefile Makefile.hide + +copy .msvc\rufus_sources sources >NUL 2>&1 +@echo on +%BUILD_CMD% +@echo off +if errorlevel 1 goto builderror +copy obj%BUILD_ALT_DIR%\%ARCH_DIR%\rufus.exe . >NUL 2>&1 + +if EXIST Makefile.hide ren Makefile.hide Makefile +if EXIST sources del sources >NUL 2>&1 + +goto done + +:builderror +if EXIST Makefile.hide ren Makefile.hide Makefile +if EXIST sources del sources >NUL 2>&1 +echo Build failed +goto done + +:usage +echo wdk_build must be run in a Windows Driver Kit build environment +pause + +:done +cd %PWD% \ No newline at end of file