Needs a complete rewrite to handle its goals but works for now.
git-svn-id: https://svn.tlawal.org/svn/ragar@8 618e81bd-0769-42e7-8608-769e73fecc77
This commit is contained in:
parent
0fd5331a75
commit
2b2857d12a
18
build.bat
18
build.bat
@ -17,12 +17,15 @@ cd /D "%~dp0"
|
|||||||
:: `build debug`
|
:: `build debug`
|
||||||
:: `build debug msvc`
|
:: `build debug msvc`
|
||||||
:: `build release clang`
|
:: `build release clang`
|
||||||
|
:: `build debug tracy`
|
||||||
::
|
::
|
||||||
|
|
||||||
:: Unpack Arguments
|
:: Unpack Arguments
|
||||||
for %%a in (%*) do in set "%%a=1"
|
for %%a in (%*) do set "%%a=1"
|
||||||
if not "%msvc%"=="1" if not "%clang%"=="1" set msvc=1
|
|
||||||
|
if not "%msvc%"=="1" set msvc=1
|
||||||
if not "%release%"=="1" set debug=1
|
if not "%release%"=="1" set debug=1
|
||||||
|
|
||||||
if "%debug%"=="1" set release=0 && echo [debug mode]
|
if "%debug%"=="1" set release=0 && echo [debug mode]
|
||||||
if "%release%"=="1" set debug=0 && echo [release mode]
|
if "%release%"=="1" set debug=0 && echo [release mode]
|
||||||
|
|
||||||
@ -33,6 +36,10 @@ if "%clang%"=="1" set msvc=0 && echo [clang compile]
|
|||||||
if "%~1"=="" echo [default mode] && set ragar=1
|
if "%~1"=="" echo [default mode] && set ragar=1
|
||||||
if "%~1"=="release" if "%~2"=="" echo [default release mode] && set ragar=1
|
if "%~1"=="release" if "%~2"=="" echo [default release mode] && set ragar=1
|
||||||
|
|
||||||
|
:: Unpack Command Line Build arguments
|
||||||
|
set auto_compile_flags=
|
||||||
|
if "%tracy%"=="1" set auto_compile_flags=%auto_compile_flags% /DTRACY_ENABLE && echo [tracy profiling enabled]
|
||||||
|
|
||||||
:: Third Party libraries
|
:: Third Party libraries
|
||||||
set third_party_includes="%~dp0\src\\third_party\\SDL2\\include"
|
set third_party_includes="%~dp0\src\\third_party\\SDL2\\include"
|
||||||
set third_party_lib="%~dp0\src\\third_party\\SDL2\\lib\\x64"
|
set third_party_lib="%~dp0\src\\third_party\\SDL2\\lib\\x64"
|
||||||
@ -44,12 +51,7 @@ set cl_release= call cl /O2 /DBUILD_DEBUG=0 %cl_common%
|
|||||||
set cl_link= /link /INCREMENTAL:NO resource.res /LIBPATH:%third_party_lib% SDL2.lib SDL2main.lib shell32.lib
|
set cl_link= /link /INCREMENTAL:NO resource.res /LIBPATH:%third_party_lib% SDL2.lib SDL2main.lib shell32.lib
|
||||||
set cl_out= /out:
|
set cl_out= /out:
|
||||||
|
|
||||||
:: Clang
|
:: Clang NOTE(tijani): Coming soon
|
||||||
set clang_common= -I..\src\ -I..\local\ -gcodeview -fdiagnostics-absolute-paths -Wall -Wno-unknown-warning-option -Wno-missing-braces -Wno-unused-function -Wno-writable-strings -Wno-unused-value -Wno-unused-variable -Wno-unused-local-typedef -Wno-deprecated-register -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-single-bit-bitfield-constant-conversion -Wno-compare-distinct-pointer-types -Wno-initializer-overrides -Wno-incompatible-pointer-types-discards-qualifiers -Xclang -flto-visibility-public-std -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf
|
|
||||||
set clang_debug= call clang -g -O0 -DBUILD_DEBUG=1 %clang_common% %auto_compile_flags%
|
|
||||||
set clang_release= call clang -g -O2 -DBUILD_DEBUG=0 %clang_common% %auto_compile_flags%
|
|
||||||
set clang_link= -fuse-ld=lld -Xlinker /MANIFEST:EMBED -Xlinker logo.res
|
|
||||||
set clang_out= -o
|
|
||||||
|
|
||||||
:: Per-Build Setting
|
:: Per-Build Setting
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user