@@ -30,29 +30,26 @@ set -x
30
30
31
31
popd
32
32
33
- FLAVOUR_NAMES=(vanilla SIMD)
34
- FLAVOUR_DIRNAMES=(standard simd)
35
- SIMD_ENABLED=(' ' 1)
33
+ FLAVOURS=(standard simd)
36
34
37
35
for i in {0..1}
38
36
do
39
- FLAVOUR_NAME=" ${FLAVOUR_NAMES["$i"]} "
40
- FLAVOUR_DIRNAME=" ${FLAVOUR_DIRNAMES["$i"]} "
37
+ FLAVOUR=" ${FLAVOURS["$i"]} "
41
38
42
39
# use JUST_SIMD=1 to save time when prototyping
43
- if [[ " $JUST_SIMD " = " 1" && " $FLAVOUR_NAME " != " simd" ]]; then
44
- >&2 echo -e " \nSkipping '$FLAVOUR_NAME ' flavour build because JUST_SIMD is set."
40
+ if [[ " $JUST_SIMD " = " 1" && " $FLAVOUR " != " simd" ]]; then
41
+ >&2 echo -e " \nSkipping '$FLAVOUR ' flavour build because JUST_SIMD is set."
45
42
continue
46
43
fi
47
44
48
45
49
- FLAVOUR_DIR=" build/flavour/$FLAVOUR_DIRNAME "
50
- >&2 echo -e " \nMaking '$FLAVOUR_NAME ' flavour in ./$FLAVOUR_DIR directory"
46
+ FLAVOUR_DIR=" build/flavour/$FLAVOUR "
47
+ >&2 echo -e " \nMaking '$FLAVOUR ' flavour in ./$FLAVOUR_DIR directory"
51
48
mkdir -p " $FLAVOUR_DIR "
52
49
pushd " $FLAVOUR_DIR "
53
50
54
51
set -x
55
- SIMD_ENABLED =" $SIMD_ENABLED " " $DIR /build_makefile.sh"
52
+ FLAVOUR =" $FLAVOUR " " $DIR /build_makefile.sh"
56
53
{ set +x; } 2>& -
57
54
58
55
>&2 echo -e ' \nCompiling C++ to LLVM IR (creates ./build/bin/libbox2d.a archive)'
63
60
64
61
# generate Box2D_*.{wasm,js} from glue code + libbox2d.a
65
62
set -x
66
- SIMD_ENABLED =" $SIMD_ENABLED " " $DIR /build_wasm.sh"
63
+ FLAVOUR =" $FLAVOUR " " $DIR /build_wasm.sh"
67
64
{ set +x; } 2>& -
68
65
69
- >&2 echo -e " Completed '$FLAVOUR_NAME ' flavour"
66
+ >&2 echo -e " Completed '$FLAVOUR ' flavour"
70
67
71
68
popd
72
69
done
0 commit comments