blob: 314ee0f7b5e054a6d4dc2e542631302218c94321 (
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
|
@echo off
setlocal
:: Define the compiler and flags
set ODIN=odin
set SRC_DIR=src
set OUT_DIR_DEBUG=out\debug
set OUT_DIR_RELEASE=out\release
set PROGRAM_NAME=funhalla.exe
:: Define the build targets
call :build_debug
call :build_release
goto :eof
:build_debug
echo Building debug version...
if not exist "%OUT_DIR_DEBUG%" mkdir "%OUT_DIR_DEBUG%"
%ODIN% build %SRC_DIR% -out:%OUT_DIR_DEBUG%\%PROGRAM_NAME% --debug -define:GL_DEBUG=true
goto :eof
:build_release
echo Building release version...
if not exist "%OUT_DIR_RELEASE%" mkdir "%OUT_DIR_RELEASE%"
%ODIN% build %SRC_DIR% -out:%OUT_DIR_RELEASE%\%PROGRAM_NAME%
goto :eof
:: Clean up build artifacts
clean:
echo Cleaning up build artifacts...
rd /s /q "%OUT_DIR_DEBUG%"
rd /s /q "%OUT_DIR_RELEASE%"
:: Command to execute clean (optional, uncomment if needed)
:: call :clean
endlocal
|