1@REM ## @file
2@REM # Makefile
3@REM #
4@REM # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
5@REM # This program and the accompanying materials
6@REM # are licensed and made available under the terms and conditions of the BSD License
7@REM # which accompanies this distribution.    The full text of the license may be found at
8@REM # http://opensource.org/licenses/bsd-license.php
9@REM #
10@REM # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11@REM # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12@REM #
13
14@echo off
15@set TOOL_ERROR=0
16setlocal
17SET NMAKE_COMMAND=%1
18SHIFT
19
20:loop
21if "%1"=="" goto success
22
23ECHO Building %1
24pushd %1
25nmake %NMAKE_COMMAND%
26if ERRORLEVEL 1 (
27  set /A TOOL_ERROR= %TOOL_ERROR% + %ERRORLEVEL%
28  goto error
29)
30ECHO %1 built successfully (%NMAKE_COMMAND%)
31ECHO.
32shift
33popd
34goto loop
35
36:success
37goto exit
38
39:error
40popd
41set /A TOOL_ERROR=%TOOL_ERROR%+%ERRORLEVEL%
42ENDLOCAL
43ECHO Error while making %1!
44VERIFY OTHER 2>NUL
45
46:exit
47exit /B %TOOL_ERROR%
48