-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathrebuild_all.sh
executable file
·50 lines (41 loc) · 1.42 KB
/
rebuild_all.sh
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
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
CPU_COUNT=$(grep processor /proc/cpuinfo | wc -l)
THREADS=${CPU_COUNT}
#Some how, running more than 8 tasks doesn't succeed every time
#if [ ${THREADS} -gt 8 ]
#then
# THREADS=8
#fi
args=("$@")
if [ "${args[ 0 ]}" == "-h" ]
then
echo "Options are:"
echo "-h prints this help text"
echo "--with-nonvampire-support building for non-vampire platforms"
exit
fi
echo "##############################################"
echo "# Rebuilding all"
echo "# CPU Count: ${CPU_COUNT}"
echo "# Rebuilding with ${THREADS} parallel tasks"
if [ $# -gt 0 ]; then echo "# Building with $@"; fi
echo "##############################################"
sleep 3
make clean
git clean -df
rm -rf bin/amiga-m68k
rm -rf config/features.status
source ./make_dist_config.sh
DISTOPTNAME="--enable-dist-name=${DISTRONAME}"
DISTOPTVER="--enable-dist-version=${DISTROVERSION}"
./configure "${DISTOPTNAME}" "${DISTOPTVER}" --target=amiga-m68k --with-optimization="-O2" --enable-ccache --with-aros-prefs=classic --with-resolution=640x256x4 --with-cpu=68040 --disable-mmu $@
make -j${THREADS}
make -j${THREADS} distfiles
if [ "${args[ 0 ]}" == "--with-nonvampire-support" ]
then
cat bin/amiga-m68k/gen/boot/aros-amiga-m68k-ext.bin bin/amiga-m68k/gen/boot/aros-amiga-m68k-rom.bin > ApolloROM.UAE
ls -lah ApolloROM.UAE
else
cat bin/amiga-m68k/gen/boot/aros-amiga-m68k-ext.bin bin/amiga-m68k/gen/boot/aros-amiga-m68k-rom.bin > ApolloROM.V4
ls -lah ApolloROM.V4
fi