Update builder scripts

Update builder scripts

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
2021-07-07 16:56:05 +02:00
parent 438d2dcaaa
commit e8c98ab58e
7 changed files with 23 additions and 22 deletions

6
tools/builder/cmake.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -euo pipefail
source $(dirname "$0")/functions/cmake_fn.sh
cmake_build $@

11
tools/builder/cmake_all.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -euo pipefail
curl https://raw.githubusercontent.com/dockcross/dockcross/master/Makefile -o dockcross-Makefile
make -f dockcross-Makefile display_images
source $(dirname "$0")/functions/cmake_fn.sh
for image in $(make -f dockcross-Makefile display_images); do
cmake_build $image $@
done

View File

@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
cmake_build () {
local image=$1
local build_file=build-${image%:*}
shift 1
local cmake_arg=$@
echo "cmake arg: $cmake_arg"
echo "Pulling dockcross/$image"
docker pull dockcross/$image
echo "Make script dockcross-$image"
docker run --rm dockcross/$image > ./dockcross-$image
chmod +x ./dockcross-$image
echo "Build $build_file"
./dockcross-$image cmake -B$build_file -H. -GNinja $cmake_arg
./dockcross-$image ninja -C$build_file
}

View File

@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail
makefile_build () {
local image=$1
shift 1
echo "Pulling dockcross/$image"
docker pull dockcross/$image
echo "Make script dockcross-$image"
docker run --rm dockcross/$image > ./dockcross-$image
chmod +x ./dockcross-$image
echo "Build..."
./dockcross-$image bash -c 'make CXX=$CXX CC=$CC AR=$AR AS=$AS CPP=$CPP FC=$FC'
}

6
tools/builder/makefile.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
set -euo pipefail
source $(dirname "$0")/functions/makefile_fn.sh
makefile_build $@

11
tools/builder/makefile_all.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -euo pipefail
curl https://raw.githubusercontent.com/dockcross/dockcross/master/Makefile -o dockcross-Makefile
make -f dockcross-Makefile display_images
source $(dirname "$0")/functions/makefile_fn.sh
for image in $(make -f dockcross-Makefile display_images); do
makefile_build $image $@
done