/
mvm
executable file
·58 lines (54 loc) · 2.1 KB
/
mvm
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
51
52
53
54
55
56
57
58
#!/bin/bash -e
# PharoVM with VM profiler and threaded heartbeat
INSTALLDIR=phcogspurlinuxhtRPi
# disable build of all dependencies by default because travis build takes too much time then fails.
# in case we build "non-dependency" version, we need to remove plugins with dependencies (SDL2 in particular)
if [ $1 = "all" ]; then
THIRDPARTYLIBS="libsdl2 libssh2 libgit2"
EXTERNALPLUGINS="plugins.ext.all"
shift
else
THIRDPARTYLIBS=
EXTERNALPLUGINS="plugins.ext"
fi
OPT="-g -O2 -fwrapv -DNDEBUG -DDEBUGVM=0 -DPharoVM"
if [ $# -ge 1 ]; then
INSTALLDIR="$1"; shift
fi
echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*) test -f Makefile && make reallyclean
# for lib in ${THIRDPARTYLIBS}; do
# ../../third-party/mvm ${lib} clean
# done
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../$EXTERNALPLUGINS && cp -p ../plugins.ext ./plugins.ext || cp -p ../../$EXTERNALPLUGINS ./plugins.ext)
for lib in ${THIRDPARTYLIBS}; do
../../third-party/mvm ${lib}
done
test -f config.h || ../../../platforms/unix/config/configure \
--without-npsqueak \
--without-vm-display-fbdev \
--with-vmversion=5.0 \
--with-src=spursrc \
--without-vm-display-fbdev \
--enable-fast-bitblt \
CC="c99 -march=armv6 -mfpu=vfp -mfloat-abi=hard" \
CXX=g++ \
CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" \
LIBS="-lpthread -luuid -lasound -Wl,-rpath,'\$\$ORIGIN'" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
# but older linux readlinks lack the -f flag and Raspbian lacks `readlinks`
make -j4 install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
productDir=`find ../../../products/$INSTALLDIR -name "5.0*"`
productDir=`(cd $productDir;pwd)`
for lib in ${THIRDPARTYLIBS}; do
../../third-party/mvm ${lib} install $productDir
done
../../editpharoinstall.sh ../../../products/$INSTALLDIR "$@"