-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.bat
77 lines (55 loc) · 1.31 KB
/
make.bat
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
@ECHO OFF
REM Simple batch file for running `make` instead of `mingw32-make` ;)
IF [%1]==[] (
GOTO emptyParameter
) ELSE (GOTO checkDebug)
GOTO eof
REM Parameter is empty. Running default makefile build.
:emptyParameter
echo Parameter is empty. Running default makefile build.
mingw32-make debug
mingw32-make release
GOTO eof
REM Checking if parameter == "debug"
:checkDebug
IF "%1"=="debug" (GOTO deb) ELSE (GOTO checkRelease)
REM Checking if parameter == "release"
:checkRelease
IF "%1"=="release" (GOTO rel) ELSE (GOTO checkRebuild)
REM Checking if parameter == "rebuild"
:checkRebuild
IF "%1"=="rebuild" (GOTO reb) ELSE (GOTO checkClean)
REM Checking if parameter == "clean"
:checkClean
IF "%1"=="clean" (GOTO cle) ELSE (GOTO unknownParameter)
REM Debug
:deb
ECHO Running makefile for debug
mingw32-make debug
GOTO eof
REM Release
:rel
ECHO Running makefile for release
mingw32-make release
GOTO eof
REM Rebuild
:reb
ECHO Rebuilding whole project
mingw32-make -B debug
mingw32-make -B release
GOTO eof
REM Clean
:cle
ECHO Cleaning up project
IF EXIST "bin\debug\nevada.exe" DEL "bin\debug\nevada.exe"
IF EXIST "bin\release\nevada.exe" DEL "bin\release\nevada.exe"
DEL obj\debug\*.* /q
DEL obj\release\*.* /q
GOTO eof
REM Unknown parameter
:unknownParameter
ECHO Unknown parameter.
GOTO eof
REM The end...
:eof
ECHO Bye!