blob: e9678ff90ba334b9182c5e81ac646a56ed1fc5cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
@ECHO OFF
rem Check for the help switches
IF /I "%~1"=="help" GOTO SHOWHELP
IF /I "%~1"=="/help" GOTO SHOWHELP
IF /I "%~1"=="-help" GOTO SHOWHELP
IF /I "%~1"=="--help" GOTO SHOWHELP
IF /I "%~1"=="/?" GOTO SHOWHELP
IF DEFINED MINGW64 GOTO VarOk
ECHO ERROR: Please define MINGW64 (and/or MSYS) environment variable(s)
EXIT /B
:VarOk
SET PATH=%MSYS%\bin;%MINGW64%\bin;%PATH%
IF "%~1" == "" (
SET "BUILDTYPE=build"
) ELSE (
IF /I "%~1" == "Build" SET "BUILDTYPE=build" & CALL :SubMake & EXIT /B
IF /I "%~1" == "/Build" SET "BUILDTYPE=build" & CALL :SubMake & EXIT /B
IF /I "%~1" == "-Build" SET "BUILDTYPE=build" & CALL :SubMake & EXIT /B
IF /I "%~1" == "--Build" SET "BUILDTYPE=build" & CALL :SubMake & EXIT /B
IF /I "%~1" == "Clean" SET "BUILDTYPE=clean" & CALL :SubMake clean & EXIT /B
IF /I "%~1" == "/Clean" SET "BUILDTYPE=clean" & CALL :SubMake clean & EXIT /B
IF /I "%~1" == "-Clean" SET "BUILDTYPE=clean" & CALL :SubMake clean & EXIT /B
IF /I "%~1" == "--Clean" SET "BUILDTYPE=clean" & CALL :SubMake clean & EXIT /B
IF /I "%~1" == "Rebuild" SET "BUILDTYPE=rebuild" & CALL :SubMake clean & CALL :SubMake & EXIT /B
IF /I "%~1" == "/Rebuild" SET "BUILDTYPE=rebuild" & CALL :SubMake clean & CALL :SubMake & EXIT /B
IF /I "%~1" == "-Rebuild" SET "BUILDTYPE=rebuild" & CALL :SubMake clean & CALL :SubMake & EXIT /B
IF /I "%~1" == "--Rebuild" SET "BUILDTYPE=rebuild" & CALL :SubMake clean & CALL :SubMake & EXIT /B
ECHO.
ECHO Unsupported commandline switch!
ECHO Run "%~nx0 help" for details about the commandline switches.
EXIT /B
)
:SubMake
SET "make_args=-j4"
IF /I "%BUILDTYPE%"=="clean" SET "make_args="
TITLE "make.exe VS2010=yes 64BIT=yes %make_args% %*"
ECHO make.exe VS2010=yes 64BIT=yes %make_args% %*
make.exe VS2010=yes 64BIT=yes %make_args% %*
EXIT /B
:SHOWHELP
TITLE "%~nx0 %1"
ECHO. & ECHO.
ECHO Usage: %~nx0 [Clean^|Build^|Rebuild]
ECHO.
ECHO Notes: You can also prefix the commands with "-", "--" or "/".
ECHO The arguments are case insesitive.
ECHO. & ECHO.
ECHO Executing "%~nx0" will use the defaults: "%~nx0 build"
ECHO.
ENDLOCAL
EXIT /B
|