forked from PCSX2/pcsx2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·45 lines (38 loc) · 874 Bytes
/
build.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
#!/bin/sh
flags=""
args="$@"
clean_build=false
for f in $args; do
if [ "$f" = "gsdx" ] ; then
flags="$flags -DFORCE_INTERNAL_SDL=TRUE"
fi
if [ "$f" = "dev" ] ; then
flags="$flags -DCMAKE_BUILD_TYPE=Devel"
fi
if [ "$f" = "debug" ] ; then
flags="$flags -DCMAKE_BUILD_TYPE=Debug"
fi
if [ "$f" = "release" ] ; then
flags="$flags -DCMAKE_BUILD_TYPE=Release"
fi
if [ "$f" = "clean" ] ; then
clean_build=true
fi
done
rm install_log.txt
if [ $flags ]; then
echo "Building pcsx2 with $flags"
echo "Building pcsx2 with $flags" > install_log.txt
fi
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake $flags .. 2>&1 | tee -a ../install_log.txt
if [ $clean_build = true ]; then
echo "Doing a clean build."
make clean 2>&1 | tee -a ../install_log.txt
fi
make 2>&1 | tee -a ../install_log.txt
make install 2>&1 | tee -a ../install_log.txt
cd ..