Setup proper project skeleton with 2 stage build

This commit is contained in:
2023-09-08 15:14:09 -04:00
parent 60e7d1075a
commit 0376a22775
6 changed files with 234 additions and 180 deletions

View File

@ -285,9 +285,10 @@ if ( $vendor -match "msvc" )
}
#endregion Configuration
$path_project = Join-Path $path_root 'project'
$path_project = Join-Path $path_root 'project'
$path_build = Join-Path $path_project 'build'
$path_deps = Join-Path $path_project 'dependencies'
$path_gen = Join-Path $path_project 'gen'
$update_deps = Join-Path $PSScriptRoot 'update_deps.ps1'
@ -300,14 +301,39 @@ if ( (Test-Path $path_deps) -eq $false ) {
}
$includes = @(
$path_gen,
$path_project,
$path_deps
)
$unit = Join-Path $path_project 'sanity.cpp'
$executable = Join-Path $path_build 'sanity.exe'
$compiler_args = @(
($flag_define + 'GEN_TIME')
)
#region Handmade Generate
$unit = Join-Path $path_gen 'gen_handmade.cpp'
$executable = Join-Path $path_build 'gen_handmade.exe'
build-simple $includes $compiler_args $unit $executable
write-host "Compiled Handmade Generate`n"
& $executable
if ( $false ) {
Remove-Item (Get-ChildItem -Path $path_build -Recurse -Force)
}
#endregion Handmade Generate
#region Handmade Runtime
$unit = Join-Path $path_project 'handmade_win32.cpp'
$executable = Join-Path $path_build 'handmade_win32.exe'
$compile_args = @(
)
build-simple $includes $compiler_args $unit $executable
build-simple $includes $compiler_args $unit $executable
write-host "Compiled Handmade Runtime`n"
#endregion Handmade Runtime
Pop-Location