Skip to content

Commit

Permalink
Build note
Browse files Browse the repository at this point in the history
  • Loading branch information
hotgluebanjo committed Oct 2, 2023
1 parent fb1113b commit 5c158b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ $build_lib = $false
$flags = "-O3"

if ($build_lib) {
# zig c++ doesn't work with wildcards and with -c doesn't accept multiple inputs.
# zig c++ -c doesn't work with multiple inputs.
foreach ($f in (dir ./alglib/*.cpp | select basename,extension)) {
zig c++ $flags -c "./alglib/$($f.basename).cpp" -o "./target/alglib/$($f.basename).obj"
}
}

# Won't link combined.
# Won't link concatenated for MinGW with -O3. TODO: concatenate dbg build.
zig c++ $flags -I . -c ./src/main.cpp -o ./target/main.obj
zig c++ $flags ./target/main.obj $(dir ./target/alglib/*.obj) -o ./target/sdfit.exe
zig c++ $flags ./target/main.obj (dir ./target/alglib/*.obj) -o ./target/sdfit.exe

0 comments on commit 5c158b9

Please sign in to comment.