-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildlib.sh
More file actions
executable file
·39 lines (29 loc) · 877 Bytes
/
buildlib.sh
File metadata and controls
executable file
·39 lines (29 loc) · 877 Bytes
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
33
34
35
36
37
38
39
#!/bin/bash
set -e
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
release_dir=$1
if [ "$2" = "next" ]; then
export CFLAGS="-DSPECASM_TARGET_NEXT_OPCODES"
fi
# Build the posix version of the tools with the correct flags.
# We'll need these for assembling and linking the .x file and
# binaries included in the release.
pushd $script_dir
make clean
make -j
popd
# Build fsize and copy into the release.
cp -r $script_dir/asm/fsize $release_dir
pushd $release_dir/fsize
$script_dir/saimport *.s
$script_dir/salink
popd
cp $release_dir/fsize/fsize $release_dir/specasm
# Build tst and copy into the release.
cp -r $script_dir/asm/tst $release_dir
pushd $release_dir/tst
$script_dir/saimport *.s *.ts
popd
mkdir $release_dir/specasm/lib
cp $release_dir/tst/*.x $release_dir/specasm/lib
cp $release_dir/tst/*.t $release_dir/specasm/lib