holdingarea/build.bat
author Matt Plumtree <matt.plumtree@nokia.com>
Wed, 10 Nov 2010 15:26:31 +0000
branchbug235_bringup_0
changeset 75 82d8da1d79c7
parent 37 1a4430846fcf
permissions -rw-r--r--
Move increment of EGL state reference count to where new threads are discovered for simulator version, to balance releaseState in eglReleaseThread.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     1
@echo off
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     2
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     3
rem DOS batch file for building host-side libraries
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     4
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     5
rem Set default values
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     6
set USE_MINI_EGL=OFF
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     7
set PLATSIM_EXTENSIONS=ON
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     8
set VISUAL_STUDIO_VERSION=2005
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
     9
set CMAKE_BUILD_TARGET=Release
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    10
set VISUAL_STUDIO_SOLUTION=OFF
37
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    11
set BUILD=ON
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    12
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    13
:PARSECOMMANDLINE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    14
IF '%1'=='/h' goto PRINTUSAGE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    15
IF '%1'=='/H' goto PRINTUSAGE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    16
IF '%1'=='/?' goto PRINTUSAGE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    17
IF '%1'=='/miniegl' goto ENABLEMINIEGL
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    18
IF '%1'=='/MINIEGL' goto ENABLEMINIEGL
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    19
IF '%1'=='/noplatsim' goto DISABLEPLATSIM
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    20
IF '%1'=='/NOPLATSIM' goto DISABLEPLATSIM
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    21
IF '%1'=='/vs' goto SETVISUALSTUDIOVERSION
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    22
IF '%1'=='/VS' goto SETVISUALSTUDIOVERSION
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    23
IF '%1'=='/solution' goto ENABLESOLUTION
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    24
IF '%1'=='/SOLUTION' goto ENABLESOLUTION
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    25
IF '%1'=='/debug' goto ENABLEDEBUG
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    26
IF '%1'=='/DEBUG' goto ENABLEDEBUG
37
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    27
IF '%1'=='/nobuild' goto DISABLEBUILD
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    28
IF '%1'=='/NOBUILD' goto DISABLEBUILD
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    29
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    30
if "%VISUAL_STUDIO_SOLUTION%"=="ON" (
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    31
	set GENERATOR=Visual Studio 8 2005
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    32
	if '%VISUAL_STUDIO_VERSION%'=='2008' set GENERATOR=Visual Studio 9 2008
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    33
) else (
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    34
	set GENERATOR=NMake Makefiles
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    35
)
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    36
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    37
rem Print out options
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    38
echo.
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    39
echo USE_MINI_EGL          = %USE_MINI_EGL%
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    40
echo PLATSIM_EXTENSIONS    = %PLATSIM_EXTENSIONS%
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    41
echo VISUAL_STUDIO_VERSION = %VISUAL_STUDIO_VERSION%
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    42
echo GENERATOR             = %GENERATOR%
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    43
echo CMAKE_BUILD_TARGET    = %CMAKE_BUILD_TARGET%
37
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    44
echo BUILD                 = %BUILD%
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    45
echo.
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    46
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    47
rem Execute
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    48
echo on
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    49
rmdir /s /q build
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    50
mkdir build
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    51
cd build
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    52
cmake -DUSE_MINI_EGL:Bool=%USE_MINI_EGL% -DPLATSIM_EXTENSIONS:Bool=%PLATSIM_EXTENSIONS% -DVISUAL_STUDIO_VERSION:String=%VISUAL_STUDIO_VERSION% -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TARGET% -G "%GENERATOR%" ../..
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    53
@echo off
37
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    54
if "%BUILD%"=="ON" (
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    55
if "%GENERATOR%"=="NMake Makefiles" (
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    56
	echo on
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    57
	nmake
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    58
	@echo off
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    59
)
37
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    60
)
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    61
@echo off
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    62
cd ..
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    63
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    64
goto END
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    65
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    66
:PRINTUSAGE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    67
echo Usage: build.bat [options]
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    68
echo Options:"
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    69
echo     [/H,/?]             print this message and exit
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    70
echo     [/MINIEGL]          build with miniEGL (default: disabled)
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    71
echo     [/VS VERSION]       set Visual Studio version
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    72
echo                         supported versions = 2005, 2008 (default: 2005)
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    73
echo     [/SOLUTION]         just generate VIsual Studio solution files
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    74
echo                             (default: generate NMake makefiles and build)
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    75
echo     [/DEBUG]            configure for debug build (default: release)
37
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    76
echo     [/NOBUILD]          call cmake but do not call nmake
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
    77
echo                             note: has no effect if /SOLUTION is specified
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    78
goto END
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    79
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    80
:ENABLEMINIEGL
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    81
set USE_MINI_EGL=ON
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    82
shift
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    83
goto PARSECOMMANDLINE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    84
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    85
:DISABLEPLATSIM
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    86
set PLATSIM_EXTENSIONS=OFF
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    87
shift
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    88
goto PARSECOMMANDLINE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    89
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    90
:SETVISUALSTUDIOVERSION
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    91
set VISUAL_STUDIO_VERSION=%2
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    92
shift
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    93
shift
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    94
goto PARSECOMMANDLINE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    95
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    96
:ENABLESOLUTION
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    97
set VISUAL_STUDIO_SOLUTION=ON
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    98
shift
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
    99
goto PARSECOMMANDLINE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   100
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   101
:ENABLEDEBUG
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   102
set CMAKE_BUILD_TARGET=Debug
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   103
shift
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   104
goto PARSECOMMANDLINE
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   105
37
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
   106
:DISABLEBUILD
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
   107
set BUILD=OFF
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
   108
shift
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
   109
goto PARSECOMMANDLINE
1a4430846fcf Added /NOBUILD option to holdingarea/build.bat
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 34
diff changeset
   110
34
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   111
:END
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   112
dab1d38bc12e Added build script allowing use of different toolchains
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
diff changeset
   113