mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-11-15 07:21:33 +01:00
Add scripts
Add scripts Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
ec4a94b6e4
commit
cb4653ac7a
6
tools/build/cmake.sh
Executable file
6
tools/build/cmake.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
source $(dirname "$0")/functions/cmake_fn.sh
|
||||||
|
|
||||||
|
cmake_build $@
|
11
tools/build/cmake_all.sh
Executable file
11
tools/build/cmake_all.sh
Executable 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
|
18
tools/build/functions/cmake_fn.sh
Executable file
18
tools/build/functions/cmake_fn.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cmake_build () {
|
||||||
|
local image=$1
|
||||||
|
shift 1
|
||||||
|
local cmake_arg=$@
|
||||||
|
echo "cmake arg: $cmake_arg"
|
||||||
|
|
||||||
|
echo "Pulling dockcross/$image:latest"
|
||||||
|
docker pull dockcross/$image:latest
|
||||||
|
echo "Make script dockcross-$image"
|
||||||
|
docker run --rm dockcross/$image:latest > ./dockcross-$image
|
||||||
|
chmod +x ./dockcross-$image
|
||||||
|
echo "Build build-$image"
|
||||||
|
./dockcross-$image cmake -Bbuild-$image -H. -GNinja $cmake_arg
|
||||||
|
./dockcross-$image ninja -Cbuild-$image
|
||||||
|
}
|
15
tools/build/functions/makefile_fn.sh
Executable file
15
tools/build/functions/makefile_fn.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
makefile_build () {
|
||||||
|
local image=$1
|
||||||
|
shift 1
|
||||||
|
|
||||||
|
echo "Pulling dockcross/$image:latest"
|
||||||
|
docker pull dockcross/$image:latest
|
||||||
|
echo "Make script dockcross-$image"
|
||||||
|
docker run --rm dockcross/$image:latest > ./dockcross-$image
|
||||||
|
chmod +x ./dockcross-$image
|
||||||
|
echo "Build build-$image"
|
||||||
|
./dockcross-$image bash -c 'make CXX=$CXX CC=$CC AR=$AR AS=$AS CPP=$CPP FC=$FC'
|
||||||
|
}
|
6
tools/build/makefile.sh
Executable file
6
tools/build/makefile.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
source $(dirname "$0")/functions/makefile_fn.sh
|
||||||
|
|
||||||
|
makefile_build $@
|
11
tools/build/makefile_all.sh
Executable file
11
tools/build/makefile_all.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user