~quf/tocs3planner

ref: dev tocs3planner/build.sh -rw-r--r-- 1.3 KiB
94c74418Lukas Himbert initial public version 1 year, 4 months ago
                                                                                
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
#!/bin/sh

set -ex

/usr/bin/env python3 gen_data.py

mkdir -p build/common
for stem in calc_stats data; do
  g++ -std=c++20 -g -W -Wall -Wextra -Werror -Wfatal-errors src/$stem.c++ -c -o build/common/$stem.o
done

for stem in notemons chars items quartz magic mstqrt orb; do
  g++ -std=c++20 -g -W -Wall -Wextra -Werror -Wfatal-errors -I src data/$stem.c++ -c -o build/common/data_$stem.o
done

mkdir -p build/test
for stem in test_charstats test_monsstats; do
  g++ -std=c++20 -g -W -Wall -Wextra -Werror -Wfatal-errors -I src/ test/$stem.c++ -c -o build/test/$stem.o
  g++ -fsanitize=address,undefined build/common/{calc_stats,data,data_notemons,data_chars,data_items,data_quartz,data_magic,data_mstqrt,data_orb}.o build/test/$stem.o -o build/test/$stem
  build/test/$stem
done

for wxversion in 3.0.5 3.1.5; do
  for gtkversion in 2 3; do
  wxflags=$(build/wxwidgets-$wxversion-gtk$gtkversion/bin/wx-config --cxxflags | sed 's/-I/-isystem/g')
    folder=build/wx$wxversion-gtk$gtkversion
    mkdir -p $folder
    g++ -std=c++20 -g -W -Wall -Wextra -Werror -Wfatal-errors $wxflags src/main.c++ -c -o $folder/main.o
    g++ -fsanitize=address,undefined $(build/wxwidgets-$wxversion-gtk$gtkversion/bin/wx-config --libs) build/common/{calc_stats,data,data_notemons,data_chars,data_items,data_quartz,data_magic,data_mstqrt,data_orb}.o $folder/main.o -o $folder/main
  done
done