@echo off

echo Compiling validator...

g++ -O2 -o src\validate.exe -I ..\..\lib src\validate.cpp

echo Compiling generators...

g++ -O2 -o src\gen_rand.exe -I ..\..\lib src\gen_rand.cpp
g++ -O2 -o src\gen_rand_subs.exe -I ..\..\lib src\gen_rand_subs.cpp
g++ -O2 -o src\gen_outstanding.exe -I ..\..\lib src\gen_outstanding.cpp

echo Compiling checker...

g++ -O2 -o Check.exe -I ..\..\lib Check.cpp

rem    *** tests ***
md tests

pushd src
python gen_manual.py
popd src

call scripts\gen-input-via-stdout.bat "src\gen_rand.exe 199999 0 aa" "tests\43" 43
call scripts\gen-input-via-stdout.bat "src\gen_rand.exe 200000 100 bb" "tests\44" 44
call scripts\gen-input-via-stdout.bat "src\gen_rand.exe 200000 100000 ee" "tests\45" 45
call scripts\gen-input-via-stdout.bat "src\gen_rand.exe 200000 10000000000 gg" "tests\46" 46
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 0 1 hh" "tests\47" 47
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 1 1 ii" "tests\48" 48
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 10 1 kk" "tests\49" 49
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 100 1 ll" "tests\50" 50
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 1000 1 nn" "tests\51" 51
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 10000 1 oo" "tests\52" 52
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 100000 1 pp" "tests\53" 53
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 150000 1 qq" "tests\54" 54
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 190000 1 rr" "tests\55" 55
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 199900 1 tt" "tests\56" 56
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 199990 1 uu" "tests\57" 57
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 199999 1 vv" "tests\58" 58
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 200000 1 ww" "tests\59" 59
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 200000 0 xx" "tests\60" 60
call scripts\gen-input-via-stdout.bat "src\gen_rand_subs.exe 200000 200000 0 aaa" "tests\61" 61
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 10000 1 bbb" "tests\62" 62
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 10000 5000 ccc" "tests\63" 63
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 10000 10000 ddd" "tests\64" 64
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 10000 0 eee" "tests\65" 65
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 100000 2 fff" "tests\66" 66
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 100000 50000 ggg" "tests\67" 67
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 100000 100000 hhh" "tests\68" 68
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 100000 0 iii" "tests\69" 69
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199000 3 jjj" "tests\70" 70
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199000 100000 kkk" "tests\71" 71
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199000 189000 lll" "tests\72" 72
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199000 0 mmm" "tests\73" 73
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199999 1 nnn" "tests\74" 74
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199999 199999 ooo" "tests\75" 75
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199999 0 ppp" "tests\76" 76
call scripts\gen-input-via-stdout.bat "src\gen_outstanding.exe 200000 199999 0 qqq" "tests\77" 77
                                          
echo Compiling main correct solution...

g++ -O2 -o solutions\handshakes_ge.exe -I ..\..\lib solutions\handshakes_ge.cpp


call scripts\gen-answer.bat tests\01 tests\01.a "tests" ""
call scripts\gen-answer.bat tests\02 tests\02.a "tests" ""
call scripts\gen-answer.bat tests\03 tests\03.a "tests" ""
call scripts\gen-answer.bat tests\04 tests\04.a "tests" ""
call scripts\gen-answer.bat tests\05 tests\05.a "tests" ""
call scripts\gen-answer.bat tests\06 tests\06.a "tests" ""
call scripts\gen-answer.bat tests\07 tests\07.a "tests" ""
call scripts\gen-answer.bat tests\08 tests\08.a "tests" ""
call scripts\gen-answer.bat tests\09 tests\09.a "tests" ""
call scripts\gen-answer.bat tests\10 tests\10.a "tests" ""
call scripts\gen-answer.bat tests\11 tests\11.a "tests" ""
call scripts\gen-answer.bat tests\12 tests\12.a "tests" ""
call scripts\gen-answer.bat tests\13 tests\13.a "tests" ""
call scripts\gen-answer.bat tests\14 tests\14.a "tests" ""
call scripts\gen-answer.bat tests\15 tests\15.a "tests" ""
call scripts\gen-answer.bat tests\16 tests\16.a "tests" ""
call scripts\gen-answer.bat tests\17 tests\17.a "tests" ""
call scripts\gen-answer.bat tests\18 tests\18.a "tests" ""
call scripts\gen-answer.bat tests\19 tests\19.a "tests" ""
call scripts\gen-answer.bat tests\20 tests\20.a "tests" ""
call scripts\gen-answer.bat tests\21 tests\21.a "tests" ""
call scripts\gen-answer.bat tests\22 tests\22.a "tests" ""
call scripts\gen-answer.bat tests\23 tests\23.a "tests" ""
call scripts\gen-answer.bat tests\24 tests\24.a "tests" ""
call scripts\gen-answer.bat tests\25 tests\25.a "tests" ""
call scripts\gen-answer.bat tests\26 tests\26.a "tests" ""
call scripts\gen-answer.bat tests\27 tests\27.a "tests" ""
call scripts\gen-answer.bat tests\28 tests\28.a "tests" ""
call scripts\gen-answer.bat tests\29 tests\29.a "tests" ""
call scripts\gen-answer.bat tests\30 tests\30.a "tests" ""
call scripts\gen-answer.bat tests\31 tests\31.a "tests" ""
call scripts\gen-answer.bat tests\32 tests\32.a "tests" ""
call scripts\gen-answer.bat tests\33 tests\33.a "tests" ""
call scripts\gen-answer.bat tests\34 tests\34.a "tests" ""
call scripts\gen-answer.bat tests\35 tests\35.a "tests" ""
call scripts\gen-answer.bat tests\36 tests\36.a "tests" ""
call scripts\gen-answer.bat tests\37 tests\37.a "tests" ""
call scripts\gen-answer.bat tests\38 tests\38.a "tests" ""
call scripts\gen-answer.bat tests\39 tests\39.a "tests" ""
call scripts\gen-answer.bat tests\40 tests\40.a "tests" ""
call scripts\gen-answer.bat tests\41 tests\41.a "tests" ""
call scripts\gen-answer.bat tests\42 tests\42.a "tests" ""
call scripts\gen-answer.bat tests\43 tests\43.a "tests" ""
call scripts\gen-answer.bat tests\44 tests\44.a "tests" ""
call scripts\gen-answer.bat tests\45 tests\45.a "tests" ""
call scripts\gen-answer.bat tests\46 tests\46.a "tests" ""
call scripts\gen-answer.bat tests\47 tests\47.a "tests" ""
call scripts\gen-answer.bat tests\48 tests\48.a "tests" ""
call scripts\gen-answer.bat tests\49 tests\49.a "tests" ""
call scripts\gen-answer.bat tests\50 tests\50.a "tests" ""
call scripts\gen-answer.bat tests\51 tests\51.a "tests" ""
call scripts\gen-answer.bat tests\52 tests\52.a "tests" ""
call scripts\gen-answer.bat tests\53 tests\53.a "tests" ""
call scripts\gen-answer.bat tests\54 tests\54.a "tests" ""
call scripts\gen-answer.bat tests\55 tests\55.a "tests" ""
call scripts\gen-answer.bat tests\56 tests\56.a "tests" ""
call scripts\gen-answer.bat tests\57 tests\57.a "tests" ""
call scripts\gen-answer.bat tests\58 tests\58.a "tests" ""
call scripts\gen-answer.bat tests\59 tests\59.a "tests" ""
call scripts\gen-answer.bat tests\60 tests\60.a "tests" ""
call scripts\gen-answer.bat tests\61 tests\61.a "tests" ""
call scripts\gen-answer.bat tests\62 tests\62.a "tests" ""
call scripts\gen-answer.bat tests\63 tests\63.a "tests" ""
call scripts\gen-answer.bat tests\64 tests\64.a "tests" ""
call scripts\gen-answer.bat tests\65 tests\65.a "tests" ""
call scripts\gen-answer.bat tests\66 tests\66.a "tests" ""
call scripts\gen-answer.bat tests\67 tests\67.a "tests" ""
call scripts\gen-answer.bat tests\68 tests\68.a "tests" ""
call scripts\gen-answer.bat tests\69 tests\69.a "tests" ""
call scripts\gen-answer.bat tests\70 tests\70.a "tests" ""
call scripts\gen-answer.bat tests\71 tests\71.a "tests" ""
call scripts\gen-answer.bat tests\72 tests\72.a "tests" ""
call scripts\gen-answer.bat tests\73 tests\73.a "tests" ""
call scripts\gen-answer.bat tests\74 tests\74.a "tests" ""
call scripts\gen-answer.bat tests\75 tests\75.a "tests" ""
call scripts\gen-answer.bat tests\76 tests\76.a "tests" ""
call scripts\gen-answer.bat tests\77 tests\77.a "tests" ""

